密码规则之数字、小写、大写、特殊字符,至少满足3个

        #region 验证密码格式
        public static bool ValidatePwd(string pwd)
        {
            return System.Text.RegularExpressions.Regex.IsMatch(pwd, "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,}$");
        }
        #endregion

 

posted @ 2021-06-09 11:21  b̶i̶n̶g̶.̶  阅读(629)  评论(0编辑  收藏  举报