From e7ed4b13fe9ca6b5345ad3c101698cb4beea2cec Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 19 Feb 2026 08:26:16 -0500 Subject: [PATCH] Clear parent error on child form failure --- .../textbox-question/textbox-question.vue | 8 +++++++- .../service-zip-question/service-zip-question.vue | 9 +++++++-- .../service-location/shop-address/shop-address.vue | 8 +++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 2443d67a..eaa5e343 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -92,6 +92,10 @@ export default { buttonMain }, props: { + alwaysEmitFieldErrorOnClick: { + type: Boolean, + default: false + }, type: { type: String, default: 'text' @@ -136,7 +140,7 @@ export default { default: () => {} } }, - emits: ['focus', 'update:modelValue', 'textboxQuestionEvent.inputIdAssigned', 'click-event'], + emits: ['focus', 'update:modelValue', 'textboxQuestionEvent.inputIdAssigned', 'click-event', 'field-has-error'], setup(props) { const propsClone = { ...props }; const { modelValue } = propsClone; @@ -254,6 +258,8 @@ export default { if (result.valid) { this.handleChange(this.value); this.$emit('click-event'); + } else if (this.alwaysEmitFieldErrorOnClick) { + this.$emit('field-has-error', true); } } } diff --git a/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue b/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue index e9671f9f..5fa30f26 100644 --- a/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue +++ b/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue @@ -2,6 +2,7 @@ + @clickEvent="updateModelValue" + @fieldHasError="handleFieldError" />