(scope, element, attr, ctrl)
| 19786 | } |
| 19787 | |
| 19788 | function badInputChecker(scope, element, attr, ctrl) { |
| 19789 | var node = element[0]; |
| 19790 | var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity); |
| 19791 | if (nativeValidation) { |
| 19792 | ctrl.$parsers.push(function(value) { |
| 19793 | var validity = element.prop(VALIDITY_STATE_PROPERTY) || {}; |
| 19794 | // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430): |
| 19795 | // - also sets validity.badInput (should only be validity.typeMismatch). |
| 19796 | // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email) |
| 19797 | // - can ignore this case as we can still read out the erroneous email... |
| 19798 | return validity.badInput && !validity.typeMismatch ? undefined : value; |
| 19799 | }); |
| 19800 | } |
| 19801 | } |
| 19802 | |
| 19803 | function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) { |
| 19804 | badInputChecker(scope, element, attr, ctrl); |
no test coverage detected