I'm using a DatePicker in my WPF 4 app (my first WPF app). This is meant to collect the date of birth of a client. I've just this app out there for users to use, and the very first thing they did was enter a date of birth of 8/3/0983. With
the client standing right there in front of them. Since it isn't likely that there's anyone alive today who is 1027 years old, I've got to put in a validation check.
So I've been spending some time reading up on the best way to do this, and have come across the ExceptionValidationRule, which I've implemented. Now, in conjunction with the class I've got that reflects the client's information, in the setting for
the date of birth, I've got a couple of validation checks to make sure the client isn't older than is reasonable (yes, I know that's debateable, but let's not quibble over that now) and also make sure that the client's date of birth isn't in the future.
(One never knows what users may try to enter.) I've tested it, and it works like a charm.
But my problem is that, once my code detects that the user has entered an invalid value for the DOB, once the user corrects it, the validation check still thinks the value is wrong?! Huh, how'd that happen, and how do I fix it, please?
View Complete Post