diff --git a/src/component/Contact/Main.js b/src/component/Contact/Main.js index e707c1f..83a2190 100644 --- a/src/component/Contact/Main.js +++ b/src/component/Contact/Main.js @@ -110,6 +110,7 @@ const Main = ({ brdcum }) => { } }) .catch((error) => { + errText.textContent = "unable to send your message, please try again" console.log(error); }); }; @@ -119,9 +120,9 @@ const Main = ({ brdcum }) => { allCountry().then((data) => setCountries(Object.values(data.data))); }, []); - useEffect(() => { - myData - }, [myData]); + // useEffect(() => { + // myData + // }, [myData]); return ( <> @@ -195,12 +196,12 @@ const Main = ({ brdcum }) => { name="name" type="text" placeholder="Name" - errorMessage="Please enter your name" + errorMessage="Please enter your first and last name. (e.g: Mark John)" required={true} maxLenght={35} value={values.name} onChange={onChange} - pattern="^[A-Za-z]{1,35}$" + pattern="^$|^[a-zA-Z]+( [a-zA-Z]+)?$+( [a-zA-Z]+)?$" />