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

Function urlValidator

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

Source from the content-addressed store, hash-verified

11684 textInputType(scope, element, attr, ctrl, $sniffer, $browser);
11685
11686 var urlValidator = function(value) {
11687 if (isEmpty(value) || URL_REGEXP.test(value)) {
11688 ctrl.$setValidity('url', true);
11689 return value;
11690 } else {
11691 ctrl.$setValidity('url', false);
11692 return undefined;
11693 }
11694 };
11695
11696 ctrl.$formatters.push(urlValidator);
11697 ctrl.$parsers.push(urlValidator);

Callers

nothing calls this directly

Calls 2

isEmptyFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected