I’m pleased to release another update to my MVC Validation Extensions. This update is once again focused on adding more functionality to the package via the following validation attribute: RequiredIfAnyValue This attribute builds upon the previous update where we created required fields based on another field’s value. Now we are able to require a field if another field is on…
Tag: mvc
MVC Validation Extensions 1.1 Released
Tonight I’ve released a small update the MVC Validation Extensions. In this updated I’ve added a new validation attribute: RequiredIfValue This attribute will cause the property to be required only if the value of the other property is equal to the specified value. Example Usage [RequiredIfValue(“RequiredIntControl”, “15”)] public int? SomeRequiredIfValue { get; set; } In this example SomeRequiredIfValue will be…
Introducing MVC Validation Extensions
I’m a big fan of ASP.net MVC especially all of the native features and conventions built in. One of my favorite features has always been how easy it is to set up client and server side validation within MVC via some simple attributes on my models. While there are a lot of built in validations I find myself writing custom…