mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-16 07:10:34 +08:00
feat: 提交非国际化版本代码
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { reactive } from "vue";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
|
||||
/** 密码正则(密码格式应为8-18位数字、字母、符号的任意两种组合) */
|
||||
export const REGEXP_PWD =
|
||||
@@ -12,9 +11,11 @@ const loginRules = reactive(<FormRules>{
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value === "") {
|
||||
callback(new Error(transformI18n($t("login.passwordReg"))));
|
||||
callback(new Error("请输入密码"));
|
||||
} else if (!REGEXP_PWD.test(value)) {
|
||||
callback(new Error(transformI18n($t("login.passwordRuleReg"))));
|
||||
callback(
|
||||
new Error("密码格式应为8-18位数字、字母、符号的任意两种组合")
|
||||
);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user