Beispiel #1
0
            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);
            }
Beispiel #2
0
            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);
            }