I want to globally change the pattern that angular.js uses to validate email fields.
By default it says that this is valid:
somone@domain
I want to modify it to require the presence of a tld
Does angular expose a global config setting for this?
I want to globally change the pattern that angular.js uses to validate email fields.
By default it says that this is valid:
somone@domain
I want to modify it to require the presence of a tld
Does angular expose a global config setting for this?
 
    
    There are three options available: to change EMAIL_REGEXP variable in angular.js file (this variable doesn't exposed), apply pattern validator or implement custom validator.
The second IMO metter way:
<div ng-form='myForm' >
  <input type='email' name='email' ng-model='email' ng-pattern='/tld/i' />
  <span ng-show='myForm.email.$error.email' >Invalid email address</span>
  <span ng-show='myForm.email.$error.pattern' >Only corporate email addresses accepted</span>
</div>
