It is not that easy to validate dates with a regular expression. There are too many variables, such as some months have 30 days, others have 31, and February normally has 28 days but every 4 years or so it has 29 days.
Have you considered using the
DateTime.TryParse Method[
^] instead?
Example:
string s1 = "40/05/2016";
string s2 = "23/14/2016";
string s3 = "29/02/2016";
DateTime date;
bool b1 = DateTime.TryParse(s1, out date);
bool b2 = DateTime.TryParse(s2, out date);
bool b3 = DateTime.TryParse(s3, out date);
Because I am not proficient with MVC, I cannot give you the exact syntax, but you should be able to figure it out from the code snippet above.