-
Notifications
You must be signed in to change notification settings - Fork 55
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
Binder does not always invalidate bad input #2702
Comments
Made a quick investigation and from what I understand, Binder currently listens to hilla/packages/ts/lit-form/src/Field.ts Lines 399 to 407 in 74c2a7f
However, this is apparently not always sufficient. I'm also not sure if running validation on input makes sense for all components, as not all of them update their value on input. So, assuming that different components can have different validation triggers, it might be better to delegate the validation triggering to the component itself by listening to the |
Possibly related to #2341 |
…2816) (CP: 24.5) (#2845) fix: invalidate binder node if bad input found by component already (#2816) Invalidate input if bad input found by component Fixes: #2702 Co-authored-by: Kriss Seglins <[email protected]>
I’m reopening this issue as it still persists. Based on the tests, the referenced fix seems to address the case where an unparsable value is set by the developer via the In our discussion with Anton, we agreed that a reasonable solution would be to replace the |
This ticket/PR has been released with Hilla 24.5.1. |
This ticket/PR has been released with Hilla 24.6.0.alpha3 and is also targeting the upcoming stable 24.6.0 version. |
Describe the bug
With Hilla Binder, DatePicker doesn't show as invalid when I enter "foo" and press Enter or leave the field. However, it does become invalid if I gradually remove characters from a valid date.
Screen.Recording.2024-09-05.at.13.06.25.mov
Expected-behavior
Fields should invalidate when bad input is applied.
Reproduction
https://vaadin.com/docs/latest/components/date-picker#custom-validation
System Info
Latest version
The text was updated successfully, but these errors were encountered: