From c3cdba2dd694d621459d4ad0b9fa191347dfc95c Mon Sep 17 00:00:00 2001 From: Casper Schuijt Date: Tue, 26 Dec 2023 02:57:57 +0100 Subject: [PATCH] Do not validate numericality on postal codes --- .../containers/Customers/CustomerForm/CustomerForm.schema.tsx | 4 ++-- .../src/containers/Vendors/VendorForm/VendorForm.schema.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx b/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx index f93810ac3..8cdb5d308 100644 --- a/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx +++ b/packages/webapp/src/containers/Customers/CustomerForm/CustomerForm.schema.tsx @@ -29,7 +29,7 @@ const Schema = Yup.object().shape({ billing_address_2: Yup.string().trim(), billing_address_city: Yup.string().trim(), billing_address_state: Yup.string().trim(), - billing_address_postcode: Yup.number().nullable(), + billing_address_postcode: Yup.string().nullable(), billing_address_phone: Yup.number(), shipping_address_country: Yup.string().trim(), @@ -37,7 +37,7 @@ const Schema = Yup.object().shape({ shipping_address_2: Yup.string().trim(), shipping_address_city: Yup.string().trim(), shipping_address_state: Yup.string().trim(), - shipping_address_postcode: Yup.number().nullable(), + shipping_address_postcode: Yup.string().nullable(), shipping_address_phone: Yup.number(), opening_balance: Yup.number().nullable(), diff --git a/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx b/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx index 6eb0edf71..5e64c61f0 100644 --- a/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx +++ b/packages/webapp/src/containers/Vendors/VendorForm/VendorForm.schema.tsx @@ -22,7 +22,7 @@ const Schema = Yup.object().shape({ billing_address_2: Yup.string().trim(), billing_address_city: Yup.string().trim(), billing_address_state: Yup.string().trim(), - billing_address_postcode: Yup.number().nullable(), + billing_address_postcode: Yup.string().nullable(), billing_address_phone: Yup.number(), shipping_address_country: Yup.string().trim(), @@ -30,7 +30,7 @@ const Schema = Yup.object().shape({ shipping_address_2: Yup.string().trim(), shipping_address_city: Yup.string().trim(), shipping_address_state: Yup.string().trim(), - shipping_address_postcode: Yup.number().nullable(), + shipping_address_postcode: Yup.string().nullable(), shipping_address_phone: Yup.number(), opening_balance: Yup.number().nullable(),