Is there a problem with using HTML5 attributes instead of jQuery or JavaScript?

6

Is there a security problem or something like using only attributes such as required in% with% s, among others instead of jQuery?

Or is it just some option to use jQuery to customize the message only?

    
asked by anonymous 16.12.2015 / 05:21

1 answer

9

Technically, no problem. Particularly in relation to security.

By this I mean that both validations are done in the user's browser and do not represent security at any level for the system, p>

From a security point of view, using both techniques is the same as using any, since a malicious user can easily forge a request for the server.

Always perform validation on the server and sanitize the data so that your system is not infected, for example by SQL injection, <script> tag injection, and so on. >

The reason for using custom code with jQuery or JavaScript is the flexibility, as you mention yourself in the question, in addition to maintaining a consistent experience across browsers.

    
16.12.2015 / 05:29