-
Notifications
You must be signed in to change notification settings - Fork 83
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
[number-field] The field is not validated when trying to commit a non-parsable value #4258
Comments
The issue is caused by the fact of using Related to #3102 |
UPD: After more investigation, the problem sounds like:
In other words, when the field already has an empty value, entering something invalid doesn't cause the input's A possible solution might be to find a way to subscribe to native validation (an |
Similar issue: #1263 - apparently the logic in this line isn't working well in such cases: web-components/packages/number-field/src/vaadin-number-field.js Lines 383 to 384 in 622dd47
We could use |
UPD: I apologize for so many metamorphoses in my conclusions of the root cause. I believe this is the final one. :) Fact 1: I checked on the events on the input and both Fact 2: Validation of invalid input is only missing when no constraints are specified. The last fact sheds light on everything. The cause is |
Description
When trying to commit a value that is not a valid number, validation doesn't happen.
The same goes for
integer-field
which is an extension ofnumber-field
.Expected outcome
Validation should fail when the user tries to commit a non-parsable number into
number-field
orinteger-field
.Minimal reproducible example
Steps to reproduce
12--
into either field and press Enter.Environment
Vaadin version(s): 23.2
OS: Mac OS
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered: