Commit 055ed036 by Jianli Ou

注册密码校验规则修改

parent 6ca2ff2e
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
{ pattern: pwdPattern, message: '密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种',}, { pattern: pwdPattern, message: '密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种',},
{ validator:validatePass,}]"> { validator:validatePass,}]">
<el-input type='password' placeholder="请输入新密码" v-model='form.newPass'></el-input> <el-input type='password' placeholder="请输入新密码" v-model='form.newPass'></el-input>
<p style="font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px;margin-top: 0;">注:密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种</p>
</el-form-item> </el-form-item>
<el-form-item label='验证密码' <el-form-item label='验证密码'
...@@ -61,8 +62,6 @@ export default { ...@@ -61,8 +62,6 @@ export default {
}, },
// pwdPattern: /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]{6,16}$/, // pwdPattern: /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]{6,16}$/,
pwdPattern: /^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)(?![@$!%*#?&]+$)[\da-zA-z@$!%*#?&]{8,20}$/, pwdPattern: /^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)(?![@$!%*#?&]+$)[\da-zA-z@$!%*#?&]{8,20}$/,
} }
}, },
methods: { methods: {
......
...@@ -67,10 +67,11 @@ ...@@ -67,10 +67,11 @@
prop='password' prop='password'
type='password' type='password'
:rules="[{required: true,message: '不能为空',}, :rules="[{required: true,message: '不能为空',},
{ pattern: pwdPattern, message: '密码为6~20位字符'}, { pattern: pwdPattern, message: '密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种'},
{ validator:validatePass,}]"> { validator:validatePass,}]">
<el-input type='password' placeholder="请输入密码" v-model='form.password'></el-input> <el-input type='password' placeholder="请输入密码" v-model='form.password'></el-input>
<p style="font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px">注:密码为6~20位字符</p> <!-- <p style="font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px">注:密码为6~20位字符</p>-->
<p style="font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px">注:密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种</p>
</el-form-item> </el-form-item>
<el-form-item label='重复密码' <el-form-item label='重复密码'
...@@ -118,7 +119,8 @@ export default { ...@@ -118,7 +119,8 @@ export default {
}, },
usernamePattern: /(?!\d+$)[\dA-Za-z\u4e00-\u9fa5]{1,10}$/, usernamePattern: /(?!\d+$)[\dA-Za-z\u4e00-\u9fa5]{1,10}$/,
mobilePattern: /^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\d{8}$/, mobilePattern: /^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\d{8}$/,
pwdPattern: /[A-Za-z0-9_]{6,20}$/, // pwdPattern: /[A-Za-z0-9_]{6,20}$/,
pwdPattern: /^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)(?![@$!%*#?&]+$)[\da-zA-z@$!%*#?&]{8,20}$/,
type:this.$route.query.isAgree || '' type:this.$route.query.isAgree || ''
} }
}, },
...@@ -228,7 +230,7 @@ export default { ...@@ -228,7 +230,7 @@ export default {
<style lang="scss"> <style lang="scss">
.register { .register {
width: 520px; width: 560px;
margin-right: 60px; margin-right: 60px;
margin-left: 40px; margin-left: 40px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment