input formnovalidate - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Introduction

Disabling Input Validation

You can turn off form validation by applying the novalidate attribute to the form element, or the formnovalidate attribute to the types of the button and input elements that can submit forms.

The following code shows how you can disable form validation.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <form method="post" action="http://example.com/form"> 
         <input type="hidden" name="recordID" value="1234"> 
         <p> 
            <label for="name">
                Name: <!--from  ww  w .ja v  a2s  .  c  o  m-->
               <input type="text" id="name" name="name" pattern="^.* .*$"> 
            </label> 
         </p> 
         <p> 
            <label for="password">
                Password: 
               <input type="password" placeholder="Min 6 characters" id="password" name="password"> 
            </label> 
         </p> 
         <p> 
            <label for="email">
                Email: 
               <input type="email" placeholder="user@mydomain.com" required pattern=".*@mydomain.com$" id="email" name="email"> 
            </label> 
         </p> 
         <input type="submit" value="Submit"> 
         <input type="submit" value="Save" formnovalidate> 
      </form>  
   </body>
</html>

Related Tutorials