Browse Source

chore : removing repeat password.

pull/2812/head
Naveen MR 2 years ago
parent
commit
b2e4be8691
  1. 27
      packages/nc-gui-v2/pages/signup.vue

27
packages/nc-gui-v2/pages/signup.vue

@ -19,8 +19,7 @@ let error = $ref<string | null>(null)
const form = reactive({ const form = reactive({
email: '', email: '',
password: '', password: ''
passwordRepeat: '',
}) })
const formRules = { const formRules = {
@ -43,20 +42,6 @@ const formRules = {
{ required: true, message: t('msg.error.signUpRules.passwdRequired') }, { required: true, message: t('msg.error.signUpRules.passwdRequired') },
{ min: 8, message: t('msg.error.signUpRules.passwdLength') }, { min: 8, message: t('msg.error.signUpRules.passwdLength') },
], ],
passwordRepeat: [
// PasswordRepeat is required
{ required: true, message: t('msg.error.signUpRules.passwdRequired') },
// Passwords match
{
validator: (_: unknown, v: string) => {
return new Promise((resolve, reject) => {
if (form.password === form.passwordRepeat) return resolve(true)
reject(new Error(t('msg.error.signUpRules.passwdMismatch')))
})
},
message: t('msg.error.signUpRules.passwdMismatch'),
},
],
} }
const signUp = async () => { const signUp = async () => {
@ -117,16 +102,6 @@ const resetError = () => {
/> />
</a-form-item> </a-form-item>
<a-form-item :label="`Repeat ${$t('labels.password')}`" name="passwordRepeat" :rules="formRules.passwordRepeat">
<a-input-password
v-model:value="form.passwordRepeat"
size="large"
class="password"
:placeholder="`Repeat ${$t('labels.password')}`"
@focus="resetError"
/>
</a-form-item>
<div class="self-center flex flex-wrap gap-4 items-center mt-4 md:mx-8 md:justify-between justify-center w-full"> <div class="self-center flex flex-wrap gap-4 items-center mt-4 md:mx-8 md:justify-between justify-center w-full">
<button class="submit" type="submit"> <button class="submit" type="submit">
<span class="flex items-center gap-2"><MaterialSymbolsRocketLaunchOutline /> {{ $t('general.signUp') }}</span> <span class="flex items-center gap-2"><MaterialSymbolsRocketLaunchOutline /> {{ $t('general.signUp') }}</span>

Loading…
Cancel
Save