You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that minlength/maxlength checks don't seem to work for textarea elements. I traced this back to this conditional check in validators/minlength.js: text_types.indexOf(get_type(element)) === -1. This fails as textarea is not in the text array in components/types.js. Not sure if this is oversight or by design... but adding it to that array addresses the issue from what I can tell.
Thanks for your work on this great package!
The text was updated successfully, but these errors were encountered:
Thanks for the issue, and sorry for the delay in answering it! Yes, at the moment this is by design to keep as close to the spec as possible. (There's no (min|max)length to textarea in the HTML5 spec for god-knows-why reasons.)
However, I'm at work (cf. issue #14) to open up the inner workings of Hyperform, so that a plugin could attach itself to certain points to provide this feature. I am also quite sure, that I'd provide such a plugin immediately myself, since I found myself in the situation as well to restrict char counts in textareas.
Long story short: Look out for #14 to be closed, and I keep this one open to track progress on a to-be-written plugin.
I noticed that minlength/maxlength checks don't seem to work for
textarea
elements. I traced this back to this conditional check invalidators/minlength.js
:text_types.indexOf(get_type(element)) === -1
. This fails astextarea
is not in thetext
array incomponents/types.js
. Not sure if this is oversight or by design... but adding it to that array addresses the issue from what I can tell.Thanks for your work on this great package!
The text was updated successfully, but these errors were encountered: