A federal appeals court has upheld a New York State requirement that all children be vaccinated before attending public school.

The U.S. Court of Appeals for the Second Circuit on Wednesday affirmed the rule, saying it didn't violate students' constitutional right of religious freedom.

The three-judge panel upheld a previous ruling by a federal judge that students exempted from the immunization policy for religious reasons can be barred from school when another child has a vaccine-preventable disease.

Three parents had challenged the requirement.

The attorney for the plaintiffs planned to appeal the decision to the U.S. Supreme Court.

The city Law Department said the decision was in the best interest of the public health.