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" />