I am checking a datetime field in mvc view for datetime format like this:
If contactToValidate.LastUpdated = Nothing OrElse Not IsDate(contactToValidate.LastUpdated) OrElse CType(contactToValidate.LastUpdated, DateTime) = DateTime.MinValue Then
_validationDictionary.AddError("AddErrorValue", "Date Format is not Correct!")
End If
but , if the input for LastUpdated in View , left blank, beside my own error ("Date Format is not Correct!") , the default error message is shown: A value is required. I believe this is what mvc framework automatically checked for datatype conversions, but as I'm checking the LastUpdated textbox for null and datetime format, I dont want this error message to be shown. I just want my own. How can I do that? Thanks