コード例 #1
0
 protected override IEnumerable <string> ValidateProperty(string propertyName)
 {
     switch (propertyName)
     {
     case nameof(FullName):
         if (FullName.All(c => Char.IsLetter(c) || (c.Equals(" "))))
         {
             yield return("Full name should consist only of letters and spaces");
         }
         break;
     }
 }