use field.name for existing error check instead of using field.id
fix existingError check
related issue
#173
what to fix
field.id is empty in case below, so you can't get all error in some case.
- checkbox
- radio
- textarea
- No id attribute is set
change
use field.name for check instead of using field.id
I think it would be better to possibly check for both. Would you be able to demonstrate what problem this is fixing?
I think it would be better to possibly check for both. Would you be able to demonstrate what problem this is fixing?
Added possibly check, and samples are below. If you don't set ID for input, it only return one ( checkbox work differently ).
http://beijaflor.github.io/validate.js/sample_original.html http://beijaflor.github.io/validate.js/sample_fixed.html
I know it's invalid html but happen often.
Yep, it's very needful thing!
i support this PR.