A generalization of Griffiths' theorem on rational integrals, II