-
Notifications
You must be signed in to change notification settings - Fork 0
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
Type=Numeric does not prevent typing non-numeric characters (DOC ISSUE?) #120
Comments
@jason-capsule42 when you say,
I am not sure what you are referencing. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number I remember this being added with the Cleave.js work around credit card numbers and to be derived from the
I see that the example is clearly broken and accepts alpha characters as well as numeric characters. I also see that the I do have concerns about redefining how the standard type number is implemented in the client if we are considering using type |
In the HTML5 input element The credit-card and date examples work because CleaveJS has it's own layer of preventing non-numeric characters being typed into those specific types. This is a heavy handed solution because I think CleaveJS is actually just cleaning up those characters rather than actually preventing them from being typed in the first place.
That is because the validation library was built with the expectation that input was following the HTML5 standard of Too add more context - I am not suggesting we remove the support for |
Moving this back to triage - not sure how I mistakenly moved this one to work in progress before. |
Please verify the version of auro-input you have installed
2.17.6
Please describe the bug
abc
)Not that this may be a doc example issue. Likely "numeric" should just be "number" but we have a working example on the docsite that sets the type to "numeric".
Reproducing the error on the docsite
This issue is reproducible on the Auro docsite
Expected behavior
The HTML5 input type=numeric does not allow non-numeric characters to be entered. We should follow this pattern.
We already prevent typing non-numeric characters into inputs that are typed for dates and credit cards.
What browsers are you seeing the problem on?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: