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: {
|
||||
type: 'email',
|
||||
required: true,
|
||||
message: this.$t('common.validations.email'),
|
||||
message: this.$t('password-reset.form.validations.email'),
|
||||
},
|
||||
},
|
||||
disabled: true,
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
<ds-form v-model="formData" :schema="formSchema" @submit="handleSubmit">
|
||||
<ds-input
|
||||
:placeholder="$t('verify-code.form.input')"
|
||||
model="token"
|
||||
name="token"
|
||||
model="code"
|
||||
name="code"
|
||||
icon="question-circle"
|
||||
/>
|
||||
<ds-space margin-botton="large">
|
||||
@ -27,3 +27,24 @@
|
||||
</ds-space>
|
||||
</ds-card>
|
||||
</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": {
|
||||
"form": {
|
||||
"input": "Code eingeben",
|
||||
"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": {
|
||||
|
||||
@ -26,7 +26,10 @@
|
||||
"form": {
|
||||
"input": "Enter your code",
|
||||
"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": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user