MCPcopy Create free account
hub / github.com/apache/cloudstack / emailInputType

Function emailInputType

tools/ngui/static/js/lib/angular.js:11700–11715  ·  view source on GitHub ↗
(scope, element, attr, ctrl, $sniffer, $browser)

Source from the content-addressed store, hash-verified

11698}
11699
11700function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
11701 textInputType(scope, element, attr, ctrl, $sniffer, $browser);
11702
11703 var emailValidator = function(value) {
11704 if (isEmpty(value) || EMAIL_REGEXP.test(value)) {
11705 ctrl.$setValidity('email', true);
11706 return value;
11707 } else {
11708 ctrl.$setValidity('email', false);
11709 return undefined;
11710 }
11711 };
11712
11713 ctrl.$formatters.push(emailValidator);
11714 ctrl.$parsers.push(emailValidator);
11715}
11716
11717function radioInputType(scope, element, attr, ctrl) {
11718 // make the name unique, if not defined

Callers

nothing calls this directly

Calls 1

textInputTypeFunction · 0.85

Tested by

no test coverage detected