Skip to content
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

Bring back setPreventInvalidInput #473

Closed
vaadin-miki opened this issue May 4, 2023 · 1 comment · Fixed by #483
Closed

Bring back setPreventInvalidInput #473

vaadin-miki opened this issue May 4, 2023 · 1 comment · Fixed by #483
Assignees
Labels
enhancement New feature or request

Comments

@vaadin-miki
Copy link
Owner

Preventing invalid input is long gone from Vaadin, it has been replaced with allowedCharPattern. This prevents the user from entering an incorrect character, but still allows the end result to be an invalid sequence (e.g. . 0 . 1 in floating-point fields). Investigate if using allowedCharPattern dynamically (on each character typed or pasted) can be a good solution. If it turns out to be doable, but negatively affecting performance, make it an optional feature (strict mode).

@vaadin-miki vaadin-miki added the enhancement New feature or request label May 4, 2023
@vaadin-miki vaadin-miki added this to the Backlog milestone May 4, 2023
@vaadin-miki vaadin-miki changed the title Number fields should not allow entering invalid numbers Number fields should not allow entering invalid sequences of valid characters May 4, 2023
@vaadin-miki vaadin-miki changed the title Number fields should not allow entering invalid sequences of valid characters Bring back setPreventInvalidInput Jun 1, 2023
@vaadin-miki
Copy link
Owner Author

this snippet on SO may actually prove helpful: https://stackoverflow.com/a/62540570/384484

vaadin-miki added a commit that referenced this issue Jun 2, 2023
@vaadin-miki vaadin-miki modified the milestones: Backlog, Next release Jun 14, 2023
@vaadin-miki vaadin-miki self-assigned this Jun 14, 2023
vaadin-miki added a commit that referenced this issue Jun 14, 2023
* #481 #473 done
* (bot) release notes updated for 0.18.3
* (bot) version updated to 0.18.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant