Esempio n. 1
0
        protected override ValidationResult IsValid(object value, ValidationContext validationContext)
        {
            string email = (string)value;

            if (UsersManager.EmailExists(email))
            {
                return(new ValidationResult(ErrorMessage));
            }

            return(ValidationResult.Success);
        }