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

Function emailValidator

tools/ngui/static/js/lib/angular.js:11703–11711  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

isEmptyFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected