protected override ValidationResult IsValid(object value, ValidationContext validationContext) { string email = (string)value; if (UsersManager.EmailExists(email)) { return(new ValidationResult(ErrorMessage)); } return(ValidationResult.Success); }