2
Adds the attribute novalidate
à <form>
.
This attribute is exactly to tell the browser that the form should not use HTML5 validation.
jsFiddle: https://jsfiddle.net/u0ts0w8k/1/
If you can put the attribute logo in the HTML, otherwise you can do it with Javascript
document.querySelector('form').setAttribute('novalidate', true);
And I used this attribute, and it worked. But the problem is that it ignores my validation in Jquery too... I want my Jquery validation to continue working.
– Vynstus
@Vynstus what is the validation you are using? Can you put an example of the code? You can adapt my jsFiddel maybe to show an example of the problem.
– Sergio
At a glance, even with the jquery validation, it runs Submit. https://jsfiddle.net/u0ts0w8k/5/
– Vynstus
@Vynstus you have to use
.preventDefault();
and you can do this: https://jsfiddle.net/u0ts0w8k/6/ (note that I passedvar err = 0;
into Event Handler because it needs to be 0 every time you try to make Submit.– Sergio
Cool! That’s right, thank you!!
– Vynstus