注册密码格式校验

This commit is contained in:
lzp
2026-03-31 14:36:13 +08:00
parent ae5de3f6f3
commit bd91dc7424
9 changed files with 130 additions and 10 deletions

View File

@@ -71,11 +71,20 @@
import OtherLogin from './other-login.vue'
import VisibleCode from './visible-code.vue'
import { useUserInfoStore } from '@/stores'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const userInfoStore = useUserInfoStore()
const router = useRouter()
const ruleForm = reactive({
email: [{ validator: validateEmail, trigger: 'blur' }],
password: [{ validator: validatePass, trigger: 'blur' }],
email: [{ validator: validateEmail, trigger: 'change' }],
password: [
{
min: 6,
max: 12,
message: t('Login.passwordLengthError', { min: 6, max: 12 }),
trigger: 'change'
}
],
privacy: [{ validator: validatePrivacy, trigger: 'change' }]
})
const isVisible = ref(false)