How to disabled HTML5 validation using Angular.js

AngularJS Form Validation

Angular.js has the 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 the Above example we have put novalidate flag in <form> tag, which will prevent HTML validation.

No comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + ''; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();