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/CreateAddress.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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

diff --git a/src/lib/address/components/CreateAddress.jsx b/src/lib/address/components/CreateAddress.jsx
index 475d8548..a4669ee0 100644
--- a/src/lib/address/components/CreateAddress.jsx
+++ b/src/lib/address/components/CreateAddress.jsx
@@ -182,6 +182,7 @@ const CreateAddress = () => {
                   <HookFormSelect {...props} options={districts} disabled={!watchCity} />
                 )}
               />
+               <div className='text-caption-2 text-red_r-11 mt-1'>{errors.district?.message}</div>
             </div>
 
             <div>
@@ -208,11 +209,12 @@ const CreateAddress = () => {
 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 contoh@email.com').required('Harus di-isi'),
+  // email: Yup.string().email('Format harus seperti contoh@email.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 defaultValues = {
-- 
cgit v1.2.3

