Jul 23, 2019 03:59 AM|Rena Ni|LINK
Could you share why do you use this RegularExpression?
[RegularExpression] attribute is used with string types. When you have a DateTime property the default model binder will use the current culture setting to parse the request value into a DateTime and it will use the yyyy-MM-dd format . So as you can see
it's the default model binder responsible for converting the user HTTP request into an instance of the DateTime field and the RegularExpression validator doesn't come into play.
Actually I suggest that using [DataType(DataType.Date)] is enough.