victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

Validation fails when input maxlength used #622

Open BigIWT opened 7 years ago

BigIWT commented 7 years ago

Hi Scratching my head with this, unsure as to why it fails, but what I've noticed is that if I use the 'maxlength' attribute within any input field, validation fails - if I remove it, it works.

Good - validation worksπŸ‘ input name="txtDocTitle" type="text" data-validation="required"

Bad - Validation fails πŸ‘Ž input name="txtDocTitle" type="text" maxlength="10" data-validation="required"

Any ideas would be greatly appreciated :)

victorjonsson commented 7 years ago

I'm not able to reproduce this http://jsbin.com/nitejanumu/edit?html,output

What version of the plugin are you using?

BigIWT commented 5 years ago

Been away a while and have come back to this issue and believe to have narrows down using MaxLength AND invoking another module, ie logic / html5. If I remove MaxLength and then invoke modules, validation works.

Good - validation works (no other modules invoked) πŸ‘ input name="txtDocTitle" type="text" maxlength="10" data-validation="required"

Bad - Validation fails (other modules invoked) πŸ‘Ž input name="txtDocTitle" type="text" maxlength="10" data-validation="required"

Any ideas would be greatly appreciated - thank you :)