mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Add validations for the code
This commit is contained in:
parent
0da7b906bd
commit
21506335b5
@ -63,7 +63,7 @@ export default {
|
|||||||
email: {
|
email: {
|
||||||
type: 'email',
|
type: 'email',
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('common.validations.email'),
|
message: this.$t('password-reset.form.validations.email'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
<ds-form v-model="formData" :schema="formSchema" @submit="handleSubmit">
|
<ds-form v-model="formData" :schema="formSchema" @submit="handleSubmit">
|
||||||
<ds-input
|
<ds-input
|
||||||
:placeholder="$t('verify-code.form.input')"
|
:placeholder="$t('verify-code.form.input')"
|
||||||
model="token"
|
model="code"
|
||||||
name="token"
|
name="code"
|
||||||
icon="question-circle"
|
icon="question-circle"
|
||||||
/>
|
/>
|
||||||
<ds-space margin-botton="large">
|
<ds-space margin-botton="large">
|
||||||
@ -27,3 +27,24 @@
|
|||||||
</ds-space>
|
</ds-space>
|
||||||
</ds-card>
|
</ds-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
code: '',
|
||||||
|
},
|
||||||
|
formSchema: {
|
||||||
|
code: {
|
||||||
|
type: 'string',
|
||||||
|
min: 6,
|
||||||
|
max: 6,
|
||||||
|
required: true,
|
||||||
|
message: this.$t('verify-code.form.validations.code'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@ -24,8 +24,12 @@
|
|||||||
},
|
},
|
||||||
"verify-code": {
|
"verify-code": {
|
||||||
"form": {
|
"form": {
|
||||||
|
"input": "Code eingeben",
|
||||||
"description": "Öffne Deine E-Mail Postfach und gib den Code ein, den wir geschickt haben.",
|
"description": "Öffne Deine E-Mail Postfach und gib den Code ein, den wir geschickt haben.",
|
||||||
"submit": "Sicherheitscode überprüfen"
|
"submit": "Sicherheitscode überprüfen",
|
||||||
|
"validations": {
|
||||||
|
"code": "muss genau 6 Buchstaben lang sein"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
|
|||||||
@ -26,7 +26,10 @@
|
|||||||
"form": {
|
"form": {
|
||||||
"input": "Enter your code",
|
"input": "Enter your code",
|
||||||
"description": "Open your inbox and enter the code that we've sent to you.",
|
"description": "Open your inbox and enter the code that we've sent to you.",
|
||||||
"submit": "Check security code"
|
"submit": "Check security code",
|
||||||
|
"validations": {
|
||||||
|
"code": "must be 6 characters long"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user