From ceaa64aa3273134fb9ffb851c4f23c468fa2519a Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 3 Apr 2023 09:58:23 +0700
Subject: setting mandatori di create and add address user

---
 src/lib/address/components/EditAddress.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/lib/address/components/EditAddress.jsx')

diff --git a/src/lib/address/components/EditAddress.jsx b/src/lib/address/components/EditAddress.jsx
index d754cbd9..006ea407 100644
--- a/src/lib/address/components/EditAddress.jsx
+++ b/src/lib/address/components/EditAddress.jsx
@@ -197,6 +197,7 @@ const EditAddress = ({ id, defaultValues }) => {
                   <HookFormSelect {...props} options={districts} disabled={!watchCity} />
                 )}
               />
+               <div className='text-caption-2 text-red_r-11 mt-1'>{errors.district?.message}</div>
             </div>
 
             <div>
@@ -222,11 +223,12 @@ const EditAddress = ({ id, defaultValues }) => {
 const validationSchema = Yup.object().shape({
   type: Yup.string().required('Harus di-pilih'),
   name: Yup.string().min(3, 'Minimal 3 karakter').required('Harus di-isi'),
-  email: Yup.string().email('Format harus seperti johndoe@example.com').required('Harus di-isi'),
+  // email: Yup.string().email('Format harus seperti johndoe@example.com').required('Harus di-isi'),
   mobile: Yup.string().required('Harus di-isi'),
   street: Yup.string().required('Harus di-isi'),
   zip: Yup.string().required('Harus di-isi'),
-  city: Yup.string().required('Harus di-pilih')
+  city: Yup.string().required('Harus di-pilih'),
+  district: Yup.string().required('Harus di-pilih')
 })
 
 const types = [
-- 
cgit v1.2.3

