Button formNoValidate Property - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Button


The formNoValidate property sets or gets whether the form-data should be validated on submission.

This property is only used for buttons with type="submit".

Set the formNoValidate property with the following Values

Value Description
true|false Sets whether the form-data should be validated on submission

Return Value

A Boolean, returns true if the form-data should not be validated, otherwise it returns false

The following code shows how to check if the form-data should be validated or not:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<form action="#" method="get">
E-mail: <input type="email" name="userid"><br>
<button id="myBtn" type="submit" formnovalidate>Submit</button>
</form>/*w  w w  .jav  a  2s .  c o  m*/

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

function myFunction() {
    var v = document.getElementById("myBtn").formNoValidate;
    document.getElementById("demo").innerHTML = v;


Related Tutorials