New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty maxlength fails validation #2047
Comments
Thanks a lot for filling this issue! I'll triage and take a look at it as soon as possible! |
bump |
Hi there, I don't really have the time for working on this issue. Would you or anyone like to write a patch for this? I'd be more than happy to walk you through the steps involved. Thanks! |
@Arkni |
I guess its still valid. Feel free to PR a unit test and a fix |
I have found the problem and fixed it, but I am not very familiar with the jquery testing framework, I need a little time to add test case, then i will submit a PR. |
Subject of the issue
Error thrown on text inputs when maxlength attribute has no value:
"Please enter no more than 0 characters."
Your environment
Steps to reproduce
https://jsfiddle.net/t80x2L2a/
Input fields with maxlength attribute but no value fail validation
Expected behaviour
If maxlength attribute has no value then it should not (and cannot) be compared to the length of the field
Actual behaviour
length is compared to param (length <= param) but this will always return false if param is empty
The text was updated successfully, but these errors were encountered: