Custom MVC validation attribute

Av | Blogg | 6 februari 2018

Finding my self in a new-old situation i needed to create a custom validation attribute. To create an custom validation attribute we inherit from the abstract class “ValidationAttribute” in System.ComponentModel.DataAnnotations. This allows for server side validation by invoking the method “IsValid”. I decided to implement an “MoreThan” attribute which checks that the one value in my […]

The post Custom MVC validation attribute appeared first on DevJunkie.

Till inlägget