samples
samples copied to clipboard
Disable validation on `keypressed`
We use a custom policy and we have a frustratring behavior for the validation.
For instance, we have an email input.
Current Behavior :
- Focus the input
- Type something
- As soon as you typed the first letter, the validation error pops up: "Please enter a valid email address."
Expected :
- Focus the input
- Type something
- As long as you don't focus out of the input, don't trigger the validation
We don't want the user to be shown the error when he didn't have the possibility to enter a valid email adress.
This is a selfasserted
page layout.
The issue is present in the latest version (2.1.29). I didn't try them all, but version 2.1.0 has a different behavior where it seems that the validation is only triggered when focusing out or when idle for the configured delay.
This is better but not ideal.
The latest pageLayout I think is 2.1.26 but you are right, the validation occurs immediately on any keypress (even on pressing Caps lock or Ctrl keys). I am afraid to switch back to some version as a number of things change such as the error messages.