Exemple #1
0
 public static IEnumerable <ValidationRuleError> Check(CandidateValidation candidate)
 {
     foreach (var source in candidate.Fields)
     {
         if (!TypeCompatibility.Check(source))
         {
             var errorMessage = DescribeTypeMismatch(candidate, source);
             yield return(new ValidationRuleError(errorMessage));
         }
     }
 }