We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ngModel
1 parent e479572 commit b43768aCopy full SHA for b43768a
docs/content/guide/forms.ngdoc
@@ -440,8 +440,7 @@ Note that you can alternatively use `ng-pattern` to further restrict the validat
440
var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@example\.com$/i;
441
442
return {
443
- require: 'ngModel',
444
- restrict: '',
+ require: '?ngModel',
445
link: function(scope, elm, attrs, ctrl) {
446
// only apply the validator if ngModel is present and Angular has added the email validator
447
if (ctrl && ctrl.$validators.email) {
0 commit comments