3
$.validator.addMethod("validpassword", function(value, element) {
return this.optional(element) ||
/^.*(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\d])(?=.*[\W]).*$/i.test(value);
}, "The password must contain a minimum of one lower case character," +
" one upper case character, one digit and one special character..");
上述正則表達式不大寫和小寫之間進行區分。怎麼了?jQuery驗證密碼強度的大寫和小寫
感謝您提供「我」,以便從模式中撤銷不區分大小寫。 – 2017-06-19 11:45:48