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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With