Skip to content

Commit b696b15

Browse files
authored
docs(Form): fixed invalid state attributes in examples (#479)
1 parent a4141f9 commit b696b15

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

docs/components/content/examples/FormExampleJoi.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const schema = Joi.object({
1010
})
1111
1212
const state = ref({
13-
email: undefined,
14-
password: undefined
13+
emailJoi: undefined,
14+
passwordJoi: undefined
1515
})
1616
1717
const form = ref()
@@ -30,11 +30,11 @@ async function submit () {
3030
@submit.prevent="submit"
3131
>
3232
<UFormGroup label="Email" name="emailJoi">
33-
<UInput v-model="state.email" />
33+
<UInput v-model="state.emailJoi" />
3434
</UFormGroup>
3535

3636
<UFormGroup label="Password" name="passwordJoi">
37-
<UInput v-model="state.password" type="password" />
37+
<UInput v-model="state.passwordJoi" type="password" />
3838
</UFormGroup>
3939

4040
<UButton type="submit">

docs/components/content/examples/FormExampleYup.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const schema = object({
1313
type Schema = InferType<typeof schema>
1414
1515
const state = ref({
16-
email: undefined,
17-
password: undefined
16+
emailYup: undefined,
17+
passwordYup: undefined
1818
})
1919
2020
const form = ref<Form<Schema>>()
@@ -33,11 +33,11 @@ async function submit () {
3333
@submit.prevent="submit"
3434
>
3535
<UFormGroup label="Email" name="emailYup">
36-
<UInput v-model="state.email" />
36+
<UInput v-model="state.emailYup" />
3737
</UFormGroup>
3838

3939
<UFormGroup label="Password" name="passwordYup">
40-
<UInput v-model="state.password" type="password" />
40+
<UInput v-model="state.passwordYup" type="password" />
4141
</UFormGroup>
4242

4343
<UButton type="submit">

docs/components/content/examples/FormExampleZod.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const schema = z.object({
1111
type Schema = z.output<typeof schema>
1212
1313
const state = ref({
14-
email: undefined,
15-
password: undefined
14+
emailZod: undefined,
15+
passwordZod: undefined
1616
})
1717
1818
const form = ref<Form<Schema>>()
@@ -31,11 +31,11 @@ async function submit () {
3131
@submit.prevent="submit"
3232
>
3333
<UFormGroup label="Email" name="emailZod">
34-
<UInput v-model="state.email" />
34+
<UInput v-model="state.emailZod" />
3535
</UFormGroup>
3636

3737
<UFormGroup label="Password" name="passwordZod">
38-
<UInput v-model="state.password" type="password" />
38+
<UInput v-model="state.passwordZod" type="password" />
3939
</UFormGroup>
4040

4141
<UButton type="submit">

0 commit comments

Comments
 (0)