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

API for disabling default validators for Binder #17178

Closed
vursen opened this issue Jul 4, 2023 · 3 comments · Fixed by #18549
Closed

API for disabling default validators for Binder #17178

vursen opened this issue Jul 4, 2023 · 3 comments · Fixed by #18549

Comments

@vursen
Copy link
Contributor

vursen commented Jul 4, 2023

Describe your motivation

Binder currently doesn't provide a way to opt-out of the default validator feature.

In the case of Flow components, the default validator checks component constraints. However, there are situations where the developer would prefer to define constraints on the component for their visual aspects but handle the actual validation manually using a custom validator.

Describe the solution you'd like

A method to disable getDefaultValidator when binding a field to a Binder.

Describe alternatives you've considered

Flow components don't seem to be a good place for such a public method since the API specifically targets Binder.

Additional context

Related to vaadin/platform#3066 and vaadin/flow-components#3406 (comment)

@vursen
Copy link
Contributor Author

vursen commented Jan 10, 2024

There has been a discussion about the API in https://github.com/orgs/vaadin/discussions/4664

@vursen vursen added the binder label Jan 19, 2024
@vursen
Copy link
Contributor Author

vursen commented Jan 19, 2024

Note, the JavaDoc needs to be updated to describe what the default validator is and how it can be disabled using this API.

@mshabarov
Copy link
Contributor

Planned for next sprint in Vaadin Flow team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: April 2024
Development

Successfully merging a pull request may close this issue.

3 participants