diff --git a/components/user/new-form.vue b/components/user/new-form.vue index da24b4b..b3f3e48 100644 --- a/components/user/new-form.vue +++ b/components/user/new-form.vue @@ -5,7 +5,7 @@ {{ t('User Name') }} - + {{ errors.accessKey }} @@ -15,8 +15,8 @@ {{ t('Password') }} - + {{ errors.secretKey }} @@ -192,14 +192,14 @@ const validate = () => { if (!editForm.accessKey.trim()) { errors.accessKey = t('Please enter username') - } else if (!/^.{6,16}$/.test(editForm.accessKey)) { - errors.accessKey = t('username length cannot be less than 8 characters and greater than 16 characters') + } else if (!/^.{4,16}$/.test(editForm.accessKey)) { + errors.accessKey = t('username length cannot be less than 4 characters and greater than 16 characters') } if (!editForm.secretKey.trim()) { errors.secretKey = t('Please enter password') - } else if (!/^.{6,16}$/.test(editForm.secretKey)) { - errors.secretKey = t('password length cannot be less than 8 characters and greater than 16 characters') + } else if (!/^.{8,40}$/.test(editForm.secretKey)) { + errors.secretKey = t('password length cannot be less than 8 characters and greater than 40 characters') } return !errors.accessKey && !errors.secretKey