Może od razu przykład. Dla klasy:
public class Dorosly {
@Range(min = 18, max = 100)
private Integer wiek;
}
Definicja komunikatu może wyglądać tak:
org.hibernate.validator.constraints.Range.message = pole musi byc z przedzialu {min} - {max}
"In theory, there is no difference between theory and practice. But, in practice, there is." Jan L. A. van de Snepscheut
public class Dorosly {
@Range(min = 18, max = 100)
private Integer wiek;
}
Definicja komunikatu może wyglądać tak:
org.hibernate.validator.constraints.Range.message = pole musi byc z przedzialu {min} - {max}