Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling form validation

Tags:

angularjs

Angularjs is running my forms through the FormController (eg tracking pristine, dirty, etc). I don't need this functionality; I'm sure it's adding overhead to my $digests.

How can I shut it off?

like image 215
Roy Truelove Avatar asked Feb 01 '13 17:02

Roy Truelove


People also ask

How do I turn off validation in Chrome?

1. On your Google Chrome address bar, type “about:flags” (without the quote) and press Enter. 2. Scroll down the list until you see the option “Disable HTML5 interactive form validation”.

How do I turn off form validation in react?

write "novalidate" in form tag.

How do I bypass HTML5 validation?

To ignore HTML validation, you can remove the attribute on button click using JavaScript. Uer removeAttribute() to remove an attribute from each of the matched elements.

How do I turn off frontend validation?

If You want to disable the validation for all elements of the form add the novalidate attribute in the form tag which will disable the validation for entire form.


1 Answers

AFAIK there is no simple switch to turn off AngularJS validation. Actually most of the validation happens in the NgModelController and input directives - basically code in the input.js file. So, to get rid of the built-in validation you would have to re-develop code from this file (plus some others, like select).

Did you identify validation code as a performance bottleneck in your application?

like image 128
pkozlowski.opensource Avatar answered Oct 11 '22 19:10

pkozlowski.opensource