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

Function validator

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

Source from the content-addressed store, hash-verified

12279 attr.required = true; // force truthy in case we are on non input element
12280
12281 var validator = function(value) {
12282 if (attr.required && (isEmpty(value) || value === false)) {
12283 ctrl.$setValidity('required', false);
12284 return;
12285 } else {
12286 ctrl.$setValidity('required', true);
12287 return value;
12288 }
12289 };
12290
12291 ctrl.$formatters.push(validator);
12292 ctrl.$parsers.unshift(validator);

Callers 1

requiredDirectiveFunction · 0.85

Calls 1

isEmptyFunction · 0.85

Tested by

no test coverage detected