MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / emailInputType

Function emailInputType

web/static/bower_components/angular/angular.js:21966–21977  ·  view source on GitHub ↗
(scope, element, attr, ctrl, $sniffer, $browser)

Source from the content-addressed store, hash-verified

21964}
21965
21966function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
21967 // Note: no badInputChecker here by purpose as `url` is only a validation
21968 // in browsers, i.e. we can always read out input.value even if it is not valid!
21969 baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
21970 stringBasedInputType(ctrl);
21971
21972 ctrl.$$parserName = 'email';
21973 ctrl.$validators.email = function(modelValue, viewValue) {
21974 var value = modelValue || viewValue;
21975 return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);
21976 };
21977}
21978
21979function radioInputType(scope, element, attr, ctrl) {
21980 // make the name unique, if not defined

Callers

nothing calls this directly

Calls 2

baseInputTypeFunction · 0.85
stringBasedInputTypeFunction · 0.85

Tested by

no test coverage detected