TextField Validation in Vaadin 8
new Binder<Person>().forField(tf)
.withValidator(str -> str.length() == 4, "Must be 4 chars")
.withConverter(new StringToIntegerConverter("Must be Integer"))
.withValidator(integer -> integer.equals(2017), "Wrong date")
.bind(Person::getBirthYear, Person::setBirthYear);
Comments
Post a Comment