diff --git a/src/store/index.js b/src/store/index.js index 1e402c09..8006f9f5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -373,6 +373,7 @@ export const useMainStore = defineStore({ registerClaim() { // TODO: replace place holder correlationId with the real thing const placeHolderCorrelationId = '00000000-0000-0000-0000-000000000000'; + const nonNumberCharRegex = /[^0-9]/g; globalMethods.callHttpClient({ method: endpoints.RegisterClaim.method, endpoint: endpoints.RegisterClaim.url, @@ -392,7 +393,7 @@ export const useMainStore = defineStore({ country: 'US' // TODO set from store }, homePhone: { - number: this.order.customer.phoneNumber.replaceAll('-', '') + number: this.order.customer.phoneNumber.replaceAll(nonNumberCharRegex, '') } }, caller: {