refactor: use @vuelidate for vue 3 in EditLabel.vue
This commit is contained in:
@@ -4,20 +4,20 @@
|
||||
<form class="flex flex-wrap mx-0" @submit.prevent="editLabel">
|
||||
<woot-input
|
||||
v-model.trim="title"
|
||||
:class="{ error: $v.title.$error }"
|
||||
:class="{ error: v$.title.$error }"
|
||||
class="w-full label-name--input"
|
||||
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
||||
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
||||
:error="labelTitleErrorMessage"
|
||||
@input="$v.title.$touch"
|
||||
@input="v$.title.$touch"
|
||||
/>
|
||||
<woot-input
|
||||
v-model.trim="description"
|
||||
:class="{ error: $v.description.$error }"
|
||||
:class="{ error: v$.description.$error }"
|
||||
class="w-full"
|
||||
:label="$t('LABEL_MGMT.FORM.DESCRIPTION.LABEL')"
|
||||
:placeholder="$t('LABEL_MGMT.FORM.DESCRIPTION.PLACEHOLDER')"
|
||||
@input="$v.description.$touch"
|
||||
@input="v$.description.$touch"
|
||||
/>
|
||||
|
||||
<div class="w-full">
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="flex items-center justify-end w-full gap-2 px-0 py-2">
|
||||
<woot-button
|
||||
:is-disabled="$v.title.$invalid || uiFlags.isUpdating"
|
||||
:is-disabled="v$.title.$invalid || uiFlags.isUpdating"
|
||||
:is-loading="uiFlags.isUpdating"
|
||||
>
|
||||
{{ $t('LABEL_MGMT.FORM.EDIT') }}
|
||||
|
||||
Reference in New Issue
Block a user