hilla icon indicating copy to clipboard operation
hilla copied to clipboard

React Form Binder: error message flashes on changes

Open cromoteca opened this issue 2 years ago • 2 comments

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

cromoteca avatar Aug 25 '23 14:08 cromoteca

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;

    ....
}

marcushellberg avatar Sep 08 '23 13:09 marcushellberg

I've also run into this, with client side validators. Happens both with a custom validator, with Min and with Max.

peholmst avatar Oct 21 '24 15:10 peholmst