protected override void RunValidation(T?model, IValidationContext context) { if (model.HasValue) { context.EnterScope(ScopeId, model.Value); } }
protected override void RunValidation(T model, IValidationContext context) { var i = 0; foreach (var item in model) { context.EnterCollectionItemPath(i); context.EnterScope(ScopeId, item); context.LeavePath(); if (context.ShouldFallBack) { break; } ++i; } }
protected override void RunValidation(T model, IValidationContext context) { var memberValue = GetMemberValue(model); context.EnterScope(ScopeId, memberValue); }
protected override void RunValidation(T model, IValidationContext context) { context.EnterScope(ScopeId, model); }