Can I only use HTML5 Form Validation for Client-side validations?

2

I'm a bit worried about using HTML5's Form Validation because despite the simplicity of implementation for some browsers, especially IOs and Safari support is partial as seen here .

In my current project (which I'm implementing Form Validation) the need is that all forms have to be correctly validated in all major browsers on the market, and for simplicity of implementation (which does not require any javascript ) I would like to be able to implement only HTML5 Form Validation for Client-side validations. The question is: should I? Considering that some browsers only provide partial support (what does this mean exactly?), my fear is that in some of these browsers the mandatory completion is not requested due to lack of browser support.

Note: this is not a question of security, but of support in the main browsers, considering a scenario where only HTML5 Form Validation is implemented, without any other kind of validation through javascript.

Note 2: Consider only browsers in their most current versions.

    
asked by anonymous 11.05.2016 / 22:12

2 answers

1

No, HTML5 validations are not mature enough to walk by themselves, and whenever possible ensure maximum consistency in your data by also validating in Javascript.

If you understand that the scenario for validating HTML5 forms is partial, you might want to ask yourself:

Is it possible to guarantee consistency in the data received?

In experience, validations in HTML5 are not enough, even more so if you want to ensure the same behavior of validations, that is, the same way messages are displayed.

  

Note 2: Consider only browsers in their most current versions.

The interesting thing is to work anywhere, imagine how sad it would be for the user to show your site to a friend and not open it because it is not in the proper version.

    
12.05.2016 / 13:49
0

Should you use?

Yes , it is a great way to validate a form, since the user can know immediately if he entered a wrong data. This saves waiting time for an HTTP response, and saves your server from dealing with a bad form entry. But it is indispensable validation via JS as well. And for more "sensitive" information, a new validation in the controller.

    
11.05.2016 / 22:37