Example #1
0
        public IActionResult VerifyPassword(string password)
        {
            try
            {
                var errors = passwordValidator.Errors(password);

                if (errors.Any())
                {
                    return(Json($"{string.Join(" ", errors) }"));
                }

                return(Json(true));
            }
            catch (Exception ex)
            {
                logger.LogError($"Verify password error: {ex.Message}");
                return(Json("Server error"));
            }
        }