shots aren't optional

Today I was told that the flu shot and another one (forgot the name) is no longer optional it's mandatory. I was told if I didn't agree to do it I would have to sign a form to send to the state. Is this just Texas or everywhere?