Hi! I’m wondering, is there a convenient “Jmix-way” to prevent invalid input in a TextField
component, something like Vaadin’s textField.setAllowedCharPattern()
? I’ve tried a MaskedField
, but as I understand it doesn’t allow to enter an arbitrary number of characters. So should I use ValueChangedEvent
to do the thing, or is there any more “automatic” way?
You can try to use TextChangeEvent with EAGER TextChangeEventMode
.
In the handler, analyze the input. Warn or remove invalid characters.
1 Like
Okay, thank you! So, I’ll do it manually.