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

InputMask on TextField doesn't apply setMaxLenght condition #3

Open
besatanas opened this issue Jan 2, 2018 · 0 comments
Open

InputMask on TextField doesn't apply setMaxLenght condition #3

besatanas opened this issue Jan 2, 2018 · 0 comments

Comments

@besatanas
Copy link

besatanas commented Jan 2, 2018

I'm getting a strange behaviour. If I extend a textField to have upper Casing, the setMaxLenght condition is not applied anymore and I can enter unlimited amount of characters.
`TextField textField = new TextField("caption of the text field limited with 5 chars");
TextField upperText = new TextField("Upper text limited with 5 chars");

textField.setMaxLength(5);
upperText.setMaxLength(5);

InputMask upperMask = new InputMask("") ; 
upperMask.setCasing(Casing.UPPER); 
upperMask.extend(upperText);

setContent(new VerticalLayout(textField,upperText));`

https://vaadinfiddle.com/editor/preview/7d60fe34c9c01b6a3e810c2da0524fdc49a277148085b6c957a8209ff05905e1/src/main/java/org/vaadin/vaadinfiddle/MyUI.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant