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

Function maxValidator

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

Source from the content-addressed store, hash-verified

11655 if (attr.max) {
11656 var max = parseFloat(attr.max);
11657 var maxValidator = function(value) {
11658 if (!isEmpty(value) && value > max) {
11659 ctrl.$setValidity('max', false);
11660 return undefined;
11661 } else {
11662 ctrl.$setValidity('max', true);
11663 return value;
11664 }
11665 };
11666
11667 ctrl.$parsers.push(maxValidator);
11668 ctrl.$formatters.push(maxValidator);

Callers

nothing calls this directly

Calls 1

isEmptyFunction · 0.85

Tested by

no test coverage detected