message « Validation « JPA Q&A

1. How to add custom error messages in Hibernate validator

I have a simple class like this,

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

public class Form implements Serializable {
   @Length(min = 2, max = 20)
   private String lastName;
I have ...

4. Hibernate custom validation messages

Hi! Any plans to configure custom messages other way than to overriding the The feature in the classpath is vaporware. Or is the validator so bad that nobody is using it? (for example it can't validate fields that can be empty (with the exception of a Pattern that defines that, any other validator does not work there)? And on ...