Esempio n. 1
0
 protected override ValidationResult IsValid(object value, ValidationContext validationContext)
 {
     return(CPF.EValido(value.ToString())
         ? ValidationResult.Success
         : new ValidationResult("CPF em formato inválido"));
 }
 private static bool TerCpfValido(string cpf)
 {
     return(CPF.EValido(cpf));
 }