mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-03-01 12:44:28 +00:00
Refactor: Re-use validation via error slot
This commit is contained in:
parent
e4cbf9246b
commit
253032468f
@ -22,22 +22,12 @@
|
||||
autofocus
|
||||
/>
|
||||
<ds-text align="right">
|
||||
<ds-chip v-if="form.title.length < formSchema.title.min" class="checkicon" size="base">
|
||||
<ds-chip v-if="errors && errors.title" color="danger" size="base">
|
||||
{{ form.title.length }}/{{ formSchema.title.max }}
|
||||
<ds-icon name="warning"></ds-icon>
|
||||
</ds-chip>
|
||||
<ds-chip
|
||||
v-else-if="form.title.length < formSchema.title.max"
|
||||
class="checkicon"
|
||||
size="base"
|
||||
color="primary"
|
||||
>
|
||||
<ds-chip v-else size="base">
|
||||
{{ form.title.length }}/{{ formSchema.title.max }}
|
||||
<ds-icon name="check"></ds-icon>
|
||||
</ds-chip>
|
||||
<ds-chip v-else class="checkicon" size="base" color="danger">
|
||||
{{ form.title.length }}/{{ formSchema.title.max }}
|
||||
<ds-icon name="warning"></ds-icon>
|
||||
</ds-chip>
|
||||
</ds-text>
|
||||
<client-only>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user