From 1985932f0ffe927639bfe37dcfc1e2852883d9a2 Mon Sep 17 00:00:00 2001 From: bmauger Date: Mon, 16 May 2022 10:31:56 -0400 Subject: [PATCH] CSR-561 QA Updates Fix so perfect match alert doesn't display if zip code error alert is present. --- .../license-plate-lookup.vue | 26 +++++++++++-------- src/layouts/vin-lookup/vin-lookup.vue | 21 +++++++++++---- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 5e7fdc2c1..b46a97668 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -24,7 +24,7 @@
- +
@@ -46,25 +46,25 @@ import alert from "@/ux-components/alert/alert"; import textboxQuestion from "@/common-components/textbox-question/textbox-question"; import loadingModal from '@/common-components/loading-modal/loading-modal.vue'; // Supporting files -import { - fetchCmsContentForPage +import { + fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { - settleAllPromises + settleAllPromises } from "@/helpers/layout-helper"; import store from "@/store"; import baseMixin from "@/mixins/base-mixin.js"; import { - storeActions + storeActions } from "@/constants/store-actions"; import { - storeMutations + storeMutations } from "@/constants/store-mutations"; import { - errorMessages + errorMessages } from "@/constants/error-messages"; -import { - navigateAfterSaveToHeritageFunnel +import { + navigateAfterSaveToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { getDamageString, @@ -80,6 +80,10 @@ import { } from "vee-validate"; // DEFINE VALIDATION RULES +defineRule( + "zip-format", + regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.SERVICE_ZIP_FORMAT) +); defineRule( "license-plate-required", required(errorMessages.LICENSE_PLATE_REQUIRED) @@ -256,7 +260,7 @@ export default { vinLookup.data.vehicle, zipValidation.data.state ); - + this.navigateForward(); }, navigateForward() { @@ -335,4 +339,4 @@ export default { loadingModal, }, }; - \ No newline at end of file + diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 6e3a83653..aeb9e5d8e 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -41,7 +41,7 @@ mask="#####" isRequired disableAutoFill - validationRules="zip-required" + validationRules="zip-required|zip-format" /> @@ -97,10 +97,11 @@ />