Is there a way using javax.validation to validate that a date is larger / less than or between specific dates?
I know of @Future
and @Past
开发者_运维百科 but they compare to the local VM system date. What am I missing?
I don't think there is an annotation in javax.validation that does what you want, but you can always create your own validator by extending the ConstraintValidator interface. You can see an example here: http://docs.jboss.org/hibernate/validator/4.0.1/reference/en/html/validator-customconstraints.html
精彩评论