protected override void Validate(IValidationSummary summary, Person item) { if (item.Name == "Taylor" && item.Firstname == "Tim") { summary.AddResult(new ValidationResult(Severity.Error, "Tim Taylor is not alowed")); } base.Validate(summary, item); }
protected override void Validate(IValidationSummary summary, TestClass item) { if (item.Index < 1) { summary.AddResult(new ValidationResult(Severity.Error, "Index is smaller than 1")); } base.Validate(summary, item); }