(CNN) Two states experiencing a measles outbreak, Washington and Oregon, allow parents to opt out of vaccines simply because they want to.

And while they hate to say "I told you so," pediatricians, well, told them so.

"I've been saying now for the last couple of years [that] it's only a matter of time before we see a horrific measles outbreak in the Pacific Northwest," said Dr. Peter Hotez, co-director of the Texas Children's Hospital Center for Vaccine Development.

All states require immunizations for children to attend school. Forty-seven states -- all but California, Mississippi and West Virginia -- allow parents to opt out of vaccines if they have religious beliefs against immunizations, according to the National Conference of State Legislatures

Among those 47 states, 18 states also allow parents to opt out of vaccines if they have personal, moral or philosophical beliefs against immunizations.