web-components
web-components copied to clipboard
Manual validation mode
Describe your motivation
Automatic constraint validation on every field change isn't always suitable. Consider these cases:
- Forms that should validate only on submit
- Fields with externally controlled invalid states
Describe the solution you'd like
For such cases, a manual validation mode (similar to that in Flow components) would be beneficial. It would disable the automatic validation but leave the option to trigger it programmatically by calling the validate()
method, or alternatively, control the invalid state completely manually.
Here is how the API could look like:
<vaadin-text-field manual-validation />