Javascript code for validating name Hookup with granny

We can also use them to provide a more interesting enhancement – instant form validation.

We have to be very careful here not to get carried away, creating overly aggressive validation that breaks the natural browsing behavior and gets in people’s way.

I have to confess, I’m not sure it’s really worth it!You can check out a demo below: See the Pen Instant Form Validation by Site Point (@Site Point) on Code Pen.Once that scripting is implemented, we’re actually only a couple of skips and hops away from a complete polyfill.This will render a simple list of errors on top of the form.Also note we fire the validation on submit rather than as every field is modified.

Leave a Reply