Zum Hauptinhalt springen

ViewModel Validation in MVVM

In WPF IValidatableObject, IDataErrorInfo interface implementations can be used to validate user input against validation rules. This blow shows a different approach that defines a IValidatingViewModel as interface for ViewModels that should use a validation. This is a very simple approach without relying on some black box third party technology. Validation Interface This is the […]

Using Data Annotations for Validation in WPF

The .NET Framework uses many different approaches for validation. The ASP.NET MVC for example uses Data Annotations to annotate the model classes with the definition of valid ranges, etc. In WPF on the other hand, validation rules are used to validate entries made by the user and display error messages. This post shows how to […]