Tag google
This commit is contained in:
@ -10,10 +10,6 @@ public class EmailCheckAttribute : ValidationAttribute
|
||||
var str = value as string;
|
||||
if (string.IsNullOrEmpty(str)) return ValidationResult.Success;
|
||||
|
||||
if (!Regex.IsMatch(str, "^[\\w-\\.\\+]+@([\\w-]+\\.)+[\\w-]{2,}$"))
|
||||
{
|
||||
return new ValidationResult(ErrorMessage ?? "Inserire un indirizzo Email valido");
|
||||
}
|
||||
return ValidationResult.Success;
|
||||
return !Regex.IsMatch(str, "^[\\w-\\.\\+]+@([\\w-]+\\.)+[\\w-]{2,}$") ? new ValidationResult(ErrorMessage ?? "Inserire un indirizzo Email valido") : ValidationResult.Success;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user