MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / badInputChecker

Function badInputChecker

web/static/bower_components/angular/angular.js:21884–21897  ·  view source on GitHub ↗
(scope, element, attr, ctrl)

Source from the content-addressed store, hash-verified

21882}
21883
21884function 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
21899function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
21900 badInputChecker(scope, element, attr, ctrl);

Callers 2

createDateInputTypeFunction · 0.85
numberInputTypeFunction · 0.85

Calls 1

isObjectFunction · 0.85

Tested by

no test coverage detected