Replies: 2 comments
-
Hi @Xidai, If the input is initially empty you can check on change if the value is empty or parsed to int if it's NaN. That's how native input also works: https://jsbin.com/babokidexe/1/ For me it seems reasonable to add something that might help with that validation. As in native works you can use :valid / :invalid selectors not only the value itself. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I opened issue as a feature request from the discussion: #10479 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider this scenario, there is a Input with type="Number", I only type '-' into the Input and focus out, the '-' is not a valid number, so the
event.target.value
returns empty, but what we need is to highlight it with error state to tell the user this is not a valid number so that he/she should modify it. But I can not get the real input '-'. Is there any way I can achieve that?Beta Was this translation helpful? Give feedback.
All reactions