JSR303検証では、検証メッセージのパラメータとしてBeanのプロパティを渡すことは可能ですか?
元。
class BeanA {
private String userName;
@Min(value=15, message="Age of {userName} should be greater than {value}")
private int age;
public BeanA(String userName,int age){
//initialization
}
}
オブジェクトの場合、「 AgeofAhamedは15より大きい必要があります」BeanA("Ahamed", 12)
というエラーが表示されます。