Reputation: 41
I need to validate 2 dates: "begin date" and "end date". "Begin date" must from today to the future and "end date" must be equal or greater than "Begin date". How can I do it with Data Annotations? Is it possible?
Upvotes: 1
Views: 18578
Reputation: 18974
You can do this with DataAnnotations
as mentioned in bellow links:
But, as an advice, solve this via Javascript libraries that are more easy than DataAnnotation
s like Jquery Input Mask
Upvotes: 3