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

Function minLengthValidator

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

Source from the content-addressed store, hash-verified

11587 if (attr.ngMinlength) {
11588 var minlength = int(attr.ngMinlength);
11589 var minLengthValidator = function(value) {
11590 if (!isEmpty(value) && value.length < minlength) {
11591 ctrl.$setValidity('minlength', false);
11592 return undefined;
11593 } else {
11594 ctrl.$setValidity('minlength', true);
11595 return value;
11596 }
11597 };
11598
11599 ctrl.$parsers.push(minLengthValidator);
11600 ctrl.$formatters.push(minLengthValidator);

Callers

nothing calls this directly

Calls 1

isEmptyFunction · 0.85

Tested by

no test coverage detected