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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ngMinlength/ngMaxlength broken on input type=number #7967
can confirm, @matsko this broke with the changes to the attributes / aliasing, I believe. I'm not sure we ever figured out how we wanted maxlength to work for non-text input types, but maybe it's good enough to just convert the value to a string if it's a number?
(but yeah, why not use min/max instead of minlength/maxlength for numbers?)
In my case I need it to be id's that can could also be 0008373 or something, but I see this is not possible because the model value removes the zeroes in front. I'll use a text input with a regex instead in my case.
The min/max will indeed satisfy for a minimum length of a number (value).
Activity
caitp commentedon Jun 24, 2014
can confirm, @matsko this broke with the changes to the attributes / aliasing, I believe. I'm not sure we ever figured out how we wanted maxlength to work for non-text input types, but maybe it's good enough to just convert the value to a string if it's a number?
(but yeah, why not use min/max instead of minlength/maxlength for numbers?)
caitp commentedon Jun 24, 2014
view value, or stringified model value? I dunno.
sijmenvos commentedon Jun 24, 2014
In my case I need it to be id's that can could also be 0008373 or something, but I see this is not possible because the model value removes the zeroes in front. I'll use a text input with a regex instead in my case.
The min/max will indeed satisfy for a minimum length of a number (value).
Thanks for the quick answer.
fix(input): validate minlength/maxlength for non-string values