Commit 953ad1f9 by yangming

password

1 parent e481b468
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item size="small" label="登录密码" prop="merchantLoginPassword" class="form-row"> <el-form-item size="small" label="登录密码" prop="merchantLoginPassword" class="form-row">
<el-input type="password" :readonly="pwdStatus ? 'readonly' : false" v-model="accountInfoForm.merchantLoginPassword" placeholder="请输入登录密码(必须包含6-20个字母+数字)" show-password></el-input> <el-input type="password" maxlength="20" :readonly="pwdStatus ? 'readonly' : false" v-model="accountInfoForm.merchantLoginPassword" placeholder="请输入登录密码(必须包含6-20个字母+数字)" show-password></el-input>
<el-button <el-button
type="primary" type="primary"
class="form-btn" class="form-btn"
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
{ {
required: true, required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
;/^[\S]{6,15}$/.test(value) ? callback() : callback(new Error('密码必须6-15位')) ;/^(?=.*\d)(?=.*[a-zA-Z])[\s\S]{6,20}$/.test(value) ? callback() : callback(new Error('请输入正确的6-20个密码,必须同时包含字母、数字。'))
}, },
trigger: 'change' trigger: 'change'
} }
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
name: 'password', name: 'password',
showPass: true, showPass: true,
type: 'input', type: 'input',
maxlength: 15, maxlength: 20,
suffixSlot: 'passwordSlot' suffixSlot: 'passwordSlot'
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!