|
@@ -143,7 +143,7 @@ const getRoleList = async () => {
|
|
|
|
|
|
const changeKeyName = async (value, cb) => {
|
|
|
const rgxText = '账号为数字或字母,长度6-20!'
|
|
|
- if (/^[0-9 | A-Z | a-z]{6,20}$/.test(value.toString())) {
|
|
|
+ if (/^[0-9 | A-Z | a-z]{5,20}$/.test(value.toString())) {
|
|
|
cb()
|
|
|
} else {
|
|
|
cb(value ? rgxText : '')
|
|
@@ -154,7 +154,7 @@ const changeKeyPassword = async (value, cb) => {
|
|
|
cb()
|
|
|
return
|
|
|
}
|
|
|
- const rgx = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/
|
|
|
+ const rgx = /^(?=.*[0-9])(?=.*[a-zA-Z])[0-9A-Za-z\W_]{6,20}$/;
|
|
|
const rgxText = '密码至少包含 数字和英文,长度6-20!'
|
|
|
if (rgx.test(value)) {
|
|
|
cb()
|