Custom Validation Attributes
In my last post I showed you how to use Validation attributes on your model for validation. Today I will show how you can create your own attributes that can provide custom validation for you.
To accomplish this we need to inherit from ValidationAttribute. We'll create an attribute today that will only allow a "Yes" or "No" value to be entered. A pretty bad example however it will still suffice.
Click here to see the how its done.
Adam