Tag Archives: validation

View validation with Data Annotations and custom client validations in MVC

In the post Using Data Annotations to validate models I showed that it is possible to keep validations in attributes.

In this post I am going to show how to apply these validations on the client-side.

By default when you create a standard MVC project it creates all initial structure for you, including the setup of the scripts. To enable client-side validation you need two keys under appSettings in your web.config file (which are set by default in the standard template):
Continue reading

Screen validation with Data Annotations in WPF

In the post Using Data Annotations to validate models I showed that it is possible to keep validations in attributes.

In this post I am going to show how to apply these validations on the client-side.

Note: All your models must implement INotifyPropertyChanged and to make it simple and clean I will be using Fody PropertyChanged nuget packaged.
Continue reading