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

Function validate

tools/ngui/static/js/lib/angular.js:11555–11563  ·  view source on GitHub ↗
(regexp, value)

Source from the content-addressed store, hash-verified

11553 patternValidator;
11554
11555 var validate = function(regexp, value) {
11556 if (isEmpty(value) || regexp.test(value)) {
11557 ctrl.$setValidity('pattern', true);
11558 return value;
11559 } else {
11560 ctrl.$setValidity('pattern', false);
11561 return undefined;
11562 }
11563 };
11564
11565 if (pattern) {
11566 if (pattern.match(/^\/(.*)\/$/)) {

Callers 1

textInputTypeFunction · 0.85

Calls 2

isEmptyFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected