(scope, element, attr, ctrl)
| 21882 | } |
| 21883 | |
| 21884 | function badInputChecker(scope, element, attr, ctrl) { |
| 21885 | var node = element[0]; |
| 21886 | var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity); |
| 21887 | if (nativeValidation) { |
| 21888 | ctrl.$parsers.push(function(value) { |
| 21889 | var validity = element.prop(VALIDITY_STATE_PROPERTY) || {}; |
| 21890 | // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430): |
| 21891 | // - also sets validity.badInput (should only be validity.typeMismatch). |
| 21892 | // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email) |
| 21893 | // - can ignore this case as we can still read out the erroneous email... |
| 21894 | return validity.badInput && !validity.typeMismatch ? undefined : value; |
| 21895 | }); |
| 21896 | } |
| 21897 | } |
| 21898 | |
| 21899 | function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) { |
| 21900 | badInputChecker(scope, element, attr, ctrl); |
no test coverage detected