-
-
Notifications
You must be signed in to change notification settings - Fork 48.9k
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
Input Number allows a-z characters #9421
Comments
The interaction is by designed as |
@afc163 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number |
Clearly the InputNumber should at least have an option to disallow letters, shouldn't it? Is there any workarounds? |
@luanpotter Please set type to |
Hi, @ztplz , thanks so much for your feedback, it's working now! |
@ztplz This is undocumented feature. It should be:
Pls reopen! |
I also agree with @avalanche1, as most people would expect Seems like there's resistance for this change to be implemented in the underlying library I guess the best way forward is that we just set |
|
In the onChange you can use the following to get around this with or without
|
hows to trigger
how to trigger Forrm.Item warning message from onChannge? |
type="number" is not working on the Firefox browser. Please check and fix it. I need to not allow characters to type on InputNumber. How to achieve this? |
It sounds like |
@yoyo837 I tried with but the type="number" is not working on Firefox browser. |
I mean this #9421 (comment) |
@yoyo837 I will try this #9421 (comment) |
@yoyo837 @ConorTighe #9421 (comment) is not working. |
What it is you really want? confirm again. |
@yoyo837 InputNumber only allows entering numbers only. Don't allow text and special characters. |
Yes, but |
@yoyo837 @prakashmallow try isNaN
|
You could also do this which would probably be best:
Output when testing:
|
Version
3.2.2
Environment
MacOS, Google Chrome
Reproduction link
https://codesandbox.io/s/ox7mmz9n7y
Steps to reproduce
type in the InputNumber component
What is expected?
It must not allow the user to type a-z characters.
What is actually happening?
The InputNumber allows the user to type a-z characters
It is required the attribute type="number"
The text was updated successfully, but these errors were encountered: