I have to confess, I’m not sure it’s really worth it!
If you already have this enhancement (which works in all modern browsers back to IE7), and given that you have James is a freelance web developer based in the UK, specialising in Java Script application development and building accessible websites.
Note that we want to prevent the form from being validated before its submission and display default error messages (different on each browser). We style input fields by taking advantages of :valid and :invalid CSS pseudo-classes.
For example, I’ve seen forms where it’s impossible to ) to force the focus to stay inside the field until it’s valid.
With more than a decade's professional experience, he is a published author, a frequent blogger and speaker, and an outspoken advocate of standards-based development.