diff --git a/app/components/app/person-relative/entry-form.vue b/app/components/app/person-relative/entry-form.vue index a0eafbb7..e8e51433 100644 --- a/app/components/app/person-relative/entry-form.vue +++ b/app/components/app/person-relative/entry-form.vue @@ -85,14 +85,17 @@ const { title = 'Kontak Pasien', isReadonly = false } = props numeric-only :is-disabled="isReadonly" /> - - + + + + diff --git a/app/components/pub/my-ui/form/input-base.vue b/app/components/pub/my-ui/form/input-base.vue index 15138b73..050a0f78 100644 --- a/app/components/pub/my-ui/form/input-base.vue +++ b/app/components/pub/my-ui/form/input-base.vue @@ -2,6 +2,8 @@ import type { FormErrors } from '~/types/error' import { Input } from '~/components/pub/ui/input' import { cn } from '~/lib/utils' +import { computed } from 'vue' +import { useFieldError } from 'vee-validate' import * as DE from '~/components/pub/my-ui/doc-entry' @@ -43,6 +45,10 @@ function handleInput(event: Event) { target.dispatchEvent(new Event('input', { bubbles: true })) } } + +// Get error state from vee-validate +const fieldError = useFieldError(() => props.fieldName) +const hasError = computed(() => !!fieldError.value)