Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: Validation only specified property in base class through IValidation

$
0
0
Hi

Easiest thing to do would not be to call Validate(this, propertyName) but instead create a ValidationContext (which is what is actually done under the covers).
var results = validator.Validate(new ValidationContext(this, new PropertyChain(), new MemberNameValidatorSelector(propertyName)));

Viewing all articles
Browse latest Browse all 1917

Trending Articles