MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / urlInputType

Function urlInputType

code/songhop/www/lib/angular/angular.js:19857–19868  ·  view source on GitHub ↗
(scope, element, attr, ctrl, $sniffer, $browser)

Source from the content-addressed store, hash-verified

19855}
19856
19857function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
19858 // Note: no badInputChecker here by purpose as `url` is only a validation
19859 // in browsers, i.e. we can always read out input.value even if it is not valid!
19860 baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
19861 stringBasedInputType(ctrl);
19862
19863 ctrl.$$parserName = 'url';
19864 ctrl.$validators.url = function(modelValue, viewValue) {
19865 var value = modelValue || viewValue;
19866 return ctrl.$isEmpty(value) || URL_REGEXP.test(value);
19867 };
19868}
19869
19870function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
19871 // Note: no badInputChecker here by purpose as `url` is only a validation

Callers

nothing calls this directly

Calls 2

baseInputTypeFunction · 0.70
stringBasedInputTypeFunction · 0.70

Tested by

no test coverage detected