开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜