Skip to content

Commit

Permalink
account for no phone number on the form when adding custom validators…
Browse files Browse the repository at this point in the history
… on v3.
  • Loading branch information
wjames111 committed Jan 14, 2025
1 parent 67586aa commit 015c7fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/components/contactInfo/contactInfo.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit 015c7fa

Please sign in to comment.