密码正则表达式优化
This commit is contained in:
parent
e214f08fea
commit
3a49e85425
@ -57,9 +57,10 @@ class ModifyPassword extends Component {
|
|||||||
const { getFieldDecorator } = form
|
const { getFieldDecorator } = form
|
||||||
const { visible } = this.state
|
const { visible } = this.state
|
||||||
const isComplex = (rule, value, callBack) => {
|
const isComplex = (rule, value, callBack) => {
|
||||||
let passwordReg =/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,15}$/;
|
// let passwordReg =/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,15}$/;
|
||||||
|
let passwordReg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,15}$/;
|
||||||
if (!passwordReg.test(value)) {
|
if (!passwordReg.test(value)) {
|
||||||
callBack('请设置6-15位的密码,至少包含字母、数字')
|
callBack('请设置8-15位的密码,至少包含大写字母、小写字母、数字')
|
||||||
} else {
|
} else {
|
||||||
callBack()
|
callBack()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user