예제 #1
0
        public override IEnumerable <ValidationState> Validate(string propertyName)
        {
            if (propertyName == nameof(FullName))
            {
                var errors = NotEqual("Reed Copsey").Validate(FullName, "This is a poor choice of names.");
                yield return(ValidationState.NewPropertyErrors(nameof(FullName), errors));

                yield return(ValidationState.NewEntityErrors(errors));
            }
        }