refactor: use @vuelidate for vue 3 in EditLabel.vue

This commit is contained in:
Shivam Mishra
2024-07-23 21:00:10 +05:30
parent 6317421894
commit cd078ca5ce
@@ -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') }}