(scope, element, attr, ctrl, $sniffer, $browser)
| 19855 | } |
| 19856 | |
| 19857 | function 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 | |
| 19870 | function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) { |
| 19871 | // Note: no badInputChecker here by purpose as `url` is only a validation |
nothing calls this directly
no test coverage detected