(scope, element, attr, ctrl, $sniffer, $browser)
| 21951 | } |
| 21952 | |
| 21953 | function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) { |
| 21954 | // Note: no badInputChecker here by purpose as `url` is only a validation |
| 21955 | // in browsers, i.e. we can always read out input.value even if it is not valid! |
| 21956 | baseInputType(scope, element, attr, ctrl, $sniffer, $browser); |
| 21957 | stringBasedInputType(ctrl); |
| 21958 | |
| 21959 | ctrl.$$parserName = 'url'; |
| 21960 | ctrl.$validators.url = function(modelValue, viewValue) { |
| 21961 | var value = modelValue || viewValue; |
| 21962 | return ctrl.$isEmpty(value) || URL_REGEXP.test(value); |
| 21963 | }; |
| 21964 | } |
| 21965 | |
| 21966 | function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) { |
| 21967 | // Note: no badInputChecker here by purpose as `url` is only a validation |
nothing calls this directly
no test coverage detected