Reduce min name length
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { parseError } from '#shared/utils/error';
|
||||
|
||||
const { t } = useI18n();
|
||||
const validation = useValidation();
|
||||
const emits = defineEmits<{
|
||||
update: [];
|
||||
}>();
|
||||
@@ -47,6 +48,7 @@ async function submit() {
|
||||
}
|
||||
pending.value = false;
|
||||
}
|
||||
// TODO: translate
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -56,13 +58,29 @@ async function submit() {
|
||||
<VaModal v-model="isOpen" close-button hide-default-actions>
|
||||
<h3 class="text-3xl">Create a new team</h3>
|
||||
<div class="mt-4 flex flex-col gap-4">
|
||||
<VaInput v-model="data.name" label="Name" placeholder="My cool team" />
|
||||
<VaInput
|
||||
v-model="data.name"
|
||||
label="Name"
|
||||
placeholder="My cool team"
|
||||
min-length="3"
|
||||
max-length="256"
|
||||
counter
|
||||
:rules="[
|
||||
validation.required('Name'),
|
||||
validation.max('Name', 256),
|
||||
validation.min('Name', 3)
|
||||
]"
|
||||
required
|
||||
/>
|
||||
<VaTextarea
|
||||
v-model="data.description"
|
||||
max-rows="4"
|
||||
min-rows="2"
|
||||
label="Description"
|
||||
placeholder="The best team!"
|
||||
max-length="256"
|
||||
counter
|
||||
:rules="[validation.maxOptional('Description', 256)]"
|
||||
/>
|
||||
<p>An invite code will be generated automatically.</p>
|
||||
<VaAlert v-if="error" color="danger">{{ t(error) }}</VaAlert>
|
||||
|
||||
Reference in New Issue
Block a user