vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
899 stars 56 forks source link

React Form Binder: error message flashes on changes #1179

Open cromoteca opened 1 year ago

cromoteca commented 1 year ago

After #1178, when editing a field that has an invalid length, the message flashes, see video. Screencast from 2023-08-25 16-19-24.webm

marcushellberg commented 1 year ago

I also ran into this. Here's the model I was using:

public class Customer {

    @NotBlank(message = "Name is mandatory")
    private String name;

    @NotBlank(message = "Email is mandatory")
    @Email
    private String email;

    @NotBlank(message = "Phone is mandatory")
    @Pattern(regexp = "^[0-9]{10}$", message = "Phone number must be 10 digits")
    private String phone;

    ....
}