cferdinandi / validate

A lightweight form validation script.
MIT License
230 stars 39 forks source link

Check for `type` uses `input` instead of `field` #19

Closed davidhund closed 6 years ago

davidhund commented 7 years ago

validityState-polyfill.js:L19 is currently:

var type = field.getAttribute('type') || input.nodeName.toLowerCase();

.. but should IMO be:

var type = field.getAttribute('type') || field.nodeName.toLowerCase();
cferdinandi commented 7 years ago

Yes! Good catch! I'll get this fixed ASAP.

cferdinandi commented 6 years ago

Looks like I fixed this a while ago and never closed the issue.