mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
20 lines
447 B
Vue
20 lines
447 B
Vue
<template>
|
|
<UForm :schema="schema" :state="state" class="space-y-4">
|
|
<UFormGroup label="Username" name="username" eager-validation>
|
|
<UInput v-model="state.username" placeholder="Choose Username" />
|
|
</UFormGroup>
|
|
</UForm>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { z } from 'zod'
|
|
|
|
const schema = z.object({
|
|
username: z.string().min(10, 'Must be at least 10 characters')
|
|
})
|
|
|
|
const state = reactive({
|
|
username: undefined
|
|
})
|
|
</script>
|