What is a good client-side response to validate an HTML5 form field?

I saw a lot of different backup offers for browsers that do not fully implement html5 forms (solutions using Modernizr, YepNope, Jquery validate ...), but I was not able to get something to work efficiently.

In fact, in addition to adding the datepicker, which I managed to get using Modernizr and the jQuery datepicker, I really need to make sure that the check is performed in all browsers (the main priority is checking email).

Chrome and FF all seem to work natively, but surprisingly Safari checks without the correct email address. IE clearly does not support it.

Can someone help with a fairly simple return (maybe via Modernizr)?

thanks

+7
source share
2 answers

Have you tried webshims lib ? It is built on top of jQuery, and I very accurately implemented the HTML5 chapter. You can find a list of supported attributes, properties, and methods on the website.

+7
source

Bearing in mind that proper validation must be done on the server side , you can easily plug in one of the many jQuery validation plugins .

0
source

All Articles