我想将最小密码长度设置为8,但不知怎么我无法做到这一点。
我试着通过改变regex来改变validate.js,这是在\media\system\js,但是它没有成功。
this.setHandler('password',
function (value) {
regex=/^\S[\S ]{6,98}\S$/; //Changed from 2 to 6
return regex.test(value);
}
);是否有一种方法来增加密码的最小值,并在未满足时显示适当的消息。
发布于 2013-04-19 15:15:20
要设置密码长度,需要两个步骤,
root\components\com_users\models\registration.php和Add
如果(strlen($data‘’password‘)< 8) { $this->setError(JText::sprintf('PLG_USER_PROFILE_REGWARN_PASS',$user->getError();返回false;}root\administrator\language\en-GB\en-GB.plg_user_profile.ini并在末尾添加
PLG_USER_PROFILE_REGWARN_PASS="Please enter a valid password of 8 or more characters"https://stackoverflow.com/questions/16062174
复制相似问题