Merge branch 'main' of http://192.168.2.166:3180/WFC/fe.wfc.user
This commit is contained in:
@@ -9,7 +9,7 @@ export const REG_PHONE = /^.{3,}$/;
|
||||
*
|
||||
* 6-18 characters, including letters, numbers, and underscores
|
||||
*/
|
||||
export const REG_PWD = /^[A-Za-z0-9_!@#$%^&*(),.?":{}|<>]{6,18}$/;
|
||||
export const REG_PWD = /^(?![A-Za-z0-9]+$)(?![a-z0-9\W]+$)(?![A-Za-z\W]+$)(?![A-Z0-9\W]+$)[a-zA-Z0-9\W]{6,}$/;
|
||||
|
||||
/** Email reg */
|
||||
export const REG_EMAIL = ///^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
||||
|
||||
@@ -51,7 +51,6 @@ const model = reactive<LoginForm>({
|
||||
|
||||
const rules = {
|
||||
username: patternRules.username,
|
||||
password: patternRules.pwd
|
||||
};
|
||||
|
||||
async function handleSubmit() {
|
||||
|
||||
@@ -44,7 +44,7 @@ const rules = computed<RuleRecord>(() => {
|
||||
if (value.length < 6 || value.length > 20) {
|
||||
return Promise.reject(t('page.login.register.passwordLength'));
|
||||
}
|
||||
if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,20}$/.test(value)) {
|
||||
if (/^(?![A-Za-z0-9]+$)(?![a-z0-9\W]+$)(?![A-Za-z\W]+$)(?![A-Z0-9\W]+$)[a-zA-Z0-9\W]{6,}$/.test(value)) {
|
||||
return Promise.reject(t('page.login.register.passwordFormat'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
|
||||
@@ -126,7 +126,7 @@ onMounted(() => {
|
||||
total: deviceList.length,
|
||||
pageSize: 10,
|
||||
showSizeChanger: false,
|
||||
showTotal: (total) => `共 ${total} 条`
|
||||
showTotal: (total) => `${t('page.carddata.total')} ${total} `
|
||||
}"
|
||||
>
|
||||
</a-table>
|
||||
|
||||
@@ -58,9 +58,9 @@ const formRules = computed<Record<string, Rule | Rule[]>>(() => {
|
||||
return Promise.reject(t('page.login.register.passwordLength'));
|
||||
}
|
||||
// 格式验证:必须包含字母和数字
|
||||
// if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,20}$/.test(value)) {
|
||||
// return Promise.reject(t('page.login.register.passwordFormat'));
|
||||
// }
|
||||
if (/^(?![A-Za-z0-9]+$)(?![a-z0-9\W]+$)(?![A-Za-z\W]+$)(?![A-Z0-9\W]+$)[a-zA-Z0-9\W]{6,}$/.test(value)) {
|
||||
return Promise.reject(t('page.login.register.passwordFormat'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user