How to disabled HTML5 validation using Angular.js

Angular.js has facility to restrict HTML5 validation. All input fields can validate against some basic HTML5 validations, like minimum length, maximum length, etc. These are entirely available on the new HTML5 attributes of a manikin.

It is usually a great idea to use the novalidate flag on the configuration factor. This will prevent the browser from submitting the form.

 <!DOCTYPE html>  
     <!-- CSS -->  
     <!-- load bootstrap -->  
     <link rel="stylesheet" href="css/bootstrap.min.css">   
       body      { padding-top:30px; }  
     <!-- JS -->  
     <!-- load angular -->  
     <script src="js/anguler_1.2.js"></script>   
     <script src="js/app.js"></script>  
   <body ng-app="formValidationApp" ng-controller="formController">  
     <div class="container">  
       <form name="signup_form" novalidate ng-submit="signupForm()">  
           <button type="submit" class="button radius">Submit</button>  

In Above example we have put novalidate flag in <form> tag, that will prevent to HTML validation.

No comments