WPF Data Validation? Anything out there better than IDataErrorInfo?
Asked Answered
P

1

6

Is there a preferred practice to do Data Validation from within your ViewModel?

Looking into it some people seem to prefer IDataErrorInfo and some prefer to roll out their own validation frameworks (http://www.codeproject.com/KB/WPF/wpf_custom_validation.aspx)?

I'm wondering what the "Best Practice" is for Data Validation? Is there something that is accepted by the community when it comes to adhering to the M-V-VM guidelines?

Oh, and an FYI, I'm using Prism as my MVVM framework, but I don't think it has any laid out code for Validation assistance.

Pastoralist answered 23/5, 2011 at 19:46 Comment(0)
P
4

You might use the Validation Framework of the .NET Framework. It can be used with PRISM or any other MVVM Framework. The BookLibrary sample application of the WPF Application Framework (WAF) shows how to use it together with WPF Binding.

Pavier answered 23/5, 2011 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.