Max/MinLength error message not displayed on input type number #7398
Unanswered
caiofelixuc
asked this question in
General
Replies: 1 comment 1 reply
-
use min and max for number related, minLength/maxLength for string |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Holla! Hello! its me again.
I think i found a bug, but im not sure.
I have an input, that has a max and min length, and its a required field. The validations error messages are displayed correctly, but when the input is type number the maxLength and minLength error message are not displayed.
I have a validation schema, passed right to the register api, that looks like this:

After the schema its mounted i pass it to the register api, like that:

The form is on 'onBlur' mode, so whenever i don´t type nothing, and blur the input, it displays the required error message and the max/minLength message (input type="text"):


But if the input is type="number", it just do not display the error message for max/minLength, only the browser show a hover message, but that is not what i intend.
As you can see the input value is lower than the min, so it should display the error, but it does not:

I hope its something on my end.
Hope to get an answer!
Beta Was this translation helpful? Give feedback.
All reactions