The California Senate Committee passed a bill on a 6-2 vote on Wednesday that removes "personal beliefs" as a reason to opt out schoolchildren from vaccinations.

After four hours of discussion, majority of the state lawmakers agreed that the unvaccinated schoolchildren are putting the community in danger. The bill proposes that only medical exemptions will be accepted as valid reasons to opt out of the vaccinations. In addition, unvaccinated children will not be admitted to schools in California, according to Reuters.

"I've personally witnessed the suffering caused by vaccine-preventable diseases, and all children deserve to be safe at school," Democrat Richard Pan, bill author and pediatrician, said in a statement.

"The personal belief exemption is now putting other school children and people in our community in danger."

The two lawmakers against the bill, Republican senator Jim Nielsen and Democrat senator Richard Roth, argued that the bill disregards the parental rights to their children's welfare. Some parents are against vaccinations due to its link to autism and allergic reactions, despite clarifications from medical experts that the benefits of vaccinations outweigh the risks.

"I have very profound feelings about parental rights and responsibilities and great dismay in American society over the decades how much that parental right, that parental responsibility has diminished," Nielsen told the Sacramento Bee.

Parents are also split on the issue of child vaccinations. Those who are against the bill staged a protest for almost 12 hours in front of the Senate hall in Sacramento, Calif. Parents favoring the bill, on the other hand, feel that it is responsible parenting to get their children vaccinated to protect them from diseases, Mercury News reported.

The Senate Bill 277 was proposed during the height of the Disneyland measles outbreak that infected many who visited the theme park in December last year. To date, public officials have confirmed 126 cases in California alone. Most of the victims were unvaccinated.