If I add CustomValidation on a class or a class property, how do I trigger that from code?
Thanks, Mark
If I add CustomValidation on a class or a class property, how do I trigger that from code?
Thanks, Mark
If triggering from a class then you use
Validator.ValidateObject(classNameToBeValidated, new ValidationContext(classNameToBeValidated,null,null);
If on a single property use Validator.ValidateProperty....