From 015c7faac3056930e6d3343cf2415894efacb69d Mon Sep 17 00:00:00 2001 From: wjames111 Date: Mon, 13 Jan 2025 13:00:58 -0500 Subject: [PATCH] account for no phone number on the form when adding custom validators on v3. --- src/common/components/contactInfo/contactInfo.component.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/components/contactInfo/contactInfo.component.js b/src/common/components/contactInfo/contactInfo.component.js index 6b523a1d8..f6da5d8aa 100644 --- a/src/common/components/contactInfo/contactInfo.component.js +++ b/src/common/components/contactInfo/contactInfo.component.js @@ -70,8 +70,10 @@ class Step1Controller { } addCustomValidators () { - this.detailsForm.phoneNumber.$validators.phone = number => { - return !number || phoneNumberRegex.test(number) + if (this.useV3 !== 'true') { + this.detailsForm.phoneNumber.$validators.phone = number => { + return !number || phoneNumberRegex.test(number) + } } }