I added string value for date in model:
[DatePickerValidator]
public string base_date{ get; set; }
for this date property.
String is always valid so this validation never occurs.
DatePickerValidator validates if this string is valid as date. If is not the controller adds appropriate message.
public class DatePickerValidatorAttribute : ValidationAttribute
{
public override bool IsValid(object value)
{
var parsed_date = new DateTime();
if (value != null && DateTime.TryParse(value.ToString(), out parsed_date)) return true;
return false;
}
public override string FormatErrorMessage(string name)
{ return base.FormatErrorMessage(name); }
}