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

Function badInputChecker

code/songhop/www/lib/angular/angular.js:19788–19801  ·  view source on GitHub ↗
(scope, element, attr, ctrl)

Source from the content-addressed store, hash-verified

19786}
19787
19788function 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
19803function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
19804 badInputChecker(scope, element, attr, ctrl);

Callers 2

createDateInputTypeFunction · 0.70
numberInputTypeFunction · 0.70

Calls 1

isObjectFunction · 0.70

Tested by

no test coverage detected