private TextField phoneNumberField;
…
PhoneFieldFormatter phoneNumberValidator = new PhoneFieldFormatter(“US”);
phoneNumberValidator.extend(phoneNumberField);
dosen`t work because can not convert from AbstractField to my TextField
private TextField phoneNumberField;
…
PhoneFieldFormatter phoneNumberValidator = new PhoneFieldFormatter(“US”);
phoneNumberValidator.extend(phoneNumberField);
dosen`t work because can not convert from AbstractField to my TextField
It compiles for me. Which version of Vaadin and the add-on you are using?
PhoneFieldFormatter uses AbstractTextField in the extend method, which should cover TextField, TextArea (and PasswordField).
Hello, I have exactly the same problem. Vaadin version 13 (Flow).
I’m sorry, but this add-on supports Vaadin 8 only.
I can take a look how much of an effort it would be to port to Vaadin 14. https://github.com/johannesh2/textfieldformatter/issues/14
3.0.alpha1 now supports Vaadin 13