标签: java bean-validation
我知道@Future和@Past,但它们与本地VM系统日期相比较。我错过了什么?
@Future
@Past
答案 0 :(得分:4)
我不认为javax.validation中有一个注释可以执行您想要的操作,但您始终可以通过扩展ConstraintValidator接口来创建自己的验证器。您可以在此处查看示例:http://docs.jboss.org/hibernate/validator/4.0.1/reference/en/html/validator-customconstraints.html