Disabling HTML5 validation. How to set 'novalidate' for every form globally?

zelazowy picture zelazowy · Jul 24, 2013 · Viewed 10.9k times · Source

I'm wondering if I could do something to disable HTML5 validation for every form in my application.

Is there any way to do this or I just should add novalidate attribute for each form tag?

Answer

zelazowy picture zelazowy · Jul 24, 2013

It seems the only way is to add novalidate attribute to each form using javascript/jquery, like this:

$(document).ready(function() {
    $("form").attr('novalidate', 'novalidate');
});