message « Validation « JPA Q&A





1. How to add custom error messages in Hibernate validator    stackoverflow.com

I have a simple class like this,

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

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

4. Hibernate custom validation messages    forum.hibernate.org

Hi! Any plans to configure custom messages other way than to overriding the org.hibernate.validator.resources.DefaultValidatorMessages.properties? The ValidatorMessages.properties 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 ...