Disable native browser validation

1

I would like to know how to disable native browser validation on a form? I would like to just leave my validation in JQuery.

What I wanted to remove is this "Fill in this field." text box.

Any suggestions? I tried to use novalidate but it ignored until my validation in JQuery.

    
asked by anonymous 16.05.2016 / 04:25

1 answer

2

Adds the novalidate attribute to <form> .

This attribute is exactly to tell the browser that the form should not use HTML5 validation.

jsFiddle: link

If you can put the attribute logo in HTML, otherwise you can do with JavaScript

document.querySelector('form').setAttribute('novalidate', true);
    
16.05.2016 / 05:55