I've seen many different suggestions for fallbacks for browsers who don't fully implement html5 forms (solutions involving Modernizr, YepNope, Jquery validate...) but I haven't managed to get anything to work effectively.
Essentially apart from adding a datepicker which I've managed to get going with Modernizr and JQuery datepicker all I really need to do is get the validation to work in all browsers (main priority is the email validation)
Chrome and FF everything seems to work natively, yet surprisingly Safari validates without a proper email address. IE obviously doesn't support it either
Could anyone help with a reasonably straightforward fallback (probably via Modernizr)?
Thanks
Validation-related attributesThe value must be greater than or equal to the value. There must be a value (if set). Unless the step is set to the any literal, the value must be min + an integral multiple of the step. The number of characters (code points) must not be less than the value of the attribute, if non-empty.
Short Answer. Yes the standard HTML5 validation is accessible and will pass WCAG2. 1 AA, but you can do a lot better with some JavaScript.
When you enter data, the browser and/or the web server will check to see that the data is in the correct format and within the constraints set by the application. Validation done in the browser is called client-side validation, while validation done on the server is called server-side validation.
novalidate attribute is used in form tag to disable HTML5 based Form validation. After using novalidate in form tag, required and type based validation will not work.
Have you tried webshims lib? It's build on top of jQuery and I have implemented the forms chapter of HTML5 very accurately. You can find a list of supported attributes, properties and methods on the webforms site of webhims lib.
I would like to have some feedback on this.
cheers Alex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With