I’ve a JPA which has all the validation rules as annotations. In the view, I’ve a binder for each field/bean for the JPA. When I’m trying to validate the form, all I see is. It doesn’t show the validation error in the UI.
JPA
@NotNull(message = "Contact name is required")
@Size(min = 2, max = 50, message = "Contact name must be between 2 and 50 characters")
private String contactName;
@NotNull(message = "Company name is required")
@Size(min = 2, max = 50, message = "Company name must be between 2 and 50 characters")
private String companyName;
Binder
binder.forField(contactPersonName)
.asRequired()
.bind(Customer::getContactName, Customer::setContactName);
binder.forField(companyNameField)
.asRequired()
.bind(Customer::getCompanyName, Customer::setCompanyName);

