I need to validate a date entered in a textfield (but is a DateTime anyway) and display the error to the user if there's some problem, like an invalid date (p.e. 31st of February should return an error).
If I do insert an invalid date, I get a
Cannot convert value of parameter 'DataNascimento' from 'System.String' to 'System.DateTime'.
as expected, but I don't want to display this message to the user.
Is there a way to catch this exception and change the display text?
Or to make the check before and show the error to the user inline?
I already tried the OnXXXXChanging method, but the exception is thrown before that method is called.
View Complete Post