WPF Reflections

Mar 31 2008   11:03PM GMT

Data validation in WPF, my approach



Posted by: MarkWPF
Tags:
Databinding
Validation
WPF
XAML

Whether to use IDataErrorInfo or ValidationRule – that is the question, as I posed in a previous post.

So , you may be wondering what do I do in my WPF projects?
Or you may not :-)

Well, I tend to use both!
I use IDataErrorInfo to provide validation in the business object itself, then derive extra classes from ValidationRule when I want validation across different business objects.

I have tried making the Validation classes always separate from the pure data business classes, but I found it to be counter productive and also counter intuitive.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: