I have a form fields binded to java entity model. That model has an annotation:
@ValidPassword
private String password
which validates the field with some conditions and return error message containing each failed condition separated by '\n' new line sign.
Vaadin form is connected to this model with:
username = new TextField("Username");
username.addClassName("username-field");
password = new PasswordField("Password");
password.addClassName("password-field");
binder.forField(username ).asRequired().bind("username");
binder.forField(password).asRequired().bind("password");
Writting input to password field results in: image-link When I want each failed condition to start on a new line.