From 11575cfb960ab0fe7ff0aa9a12d707e36ac563e3 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Wed, 11 Feb 2026 18:37:39 +0200 Subject: [PATCH] fix(webapp): allow formatted phone numbers in customer and vendor forms --- .../Customers/CustomerForm/CustomerForm.schema.tsx | 8 ++++---- .../containers/Vendors/VendorForm/VendorForm.schema.tsx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx b/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx index 8cdb5d308..c18783e4a 100644 --- a/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx +++ b/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx @@ -17,8 +17,8 @@ const Schema = Yup.object().shape({ .label(intl.get('display_name_')), email: Yup.string().email().nullable(), - work_phone: Yup.number(), - personal_phone: Yup.number(), + work_phone: Yup.string().nullable(), + personal_phone: Yup.string().nullable(), website: Yup.string().url().nullable(), active: Yup.boolean(), @@ -30,7 +30,7 @@ const Schema = Yup.object().shape({ billing_address_city: Yup.string().trim(), billing_address_state: Yup.string().trim(), billing_address_postcode: Yup.string().nullable(), - billing_address_phone: Yup.number(), + billing_address_phone: Yup.string().nullable(), shipping_address_country: Yup.string().trim(), shipping_address_1: Yup.string().trim(), @@ -38,7 +38,7 @@ const Schema = Yup.object().shape({ shipping_address_city: Yup.string().trim(), shipping_address_state: Yup.string().trim(), shipping_address_postcode: Yup.string().nullable(), - shipping_address_phone: Yup.number(), + shipping_address_phone: Yup.string().nullable(), opening_balance: Yup.number().nullable(), currency_code: Yup.string(), diff --git a/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx b/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx index 5e64c61f0..6393481c3 100644 --- a/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx +++ b/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx @@ -10,8 +10,8 @@ const Schema = Yup.object().shape({ display_name: Yup.string().trim().required().label(intl.get('display_name_')), email: Yup.string().email().nullable(), - work_phone: Yup.number(), - personal_phone: Yup.number(), + work_phone: Yup.string().nullable(), + personal_phone: Yup.string().nullable(), website: Yup.string().url().nullable(), active: Yup.boolean(), @@ -23,7 +23,7 @@ const Schema = Yup.object().shape({ billing_address_city: Yup.string().trim(), billing_address_state: Yup.string().trim(), billing_address_postcode: Yup.string().nullable(), - billing_address_phone: Yup.number(), + billing_address_phone: Yup.string().nullable(), shipping_address_country: Yup.string().trim(), shipping_address_1: Yup.string().trim(), @@ -31,7 +31,7 @@ const Schema = Yup.object().shape({ shipping_address_city: Yup.string().trim(), shipping_address_state: Yup.string().trim(), shipping_address_postcode: Yup.string().nullable(), - shipping_address_phone: Yup.number(), + shipping_address_phone: Yup.string().nullable(), opening_balance: Yup.number().nullable(), currency_code: Yup.string(),