diff --git a/package.json b/package.json
index 0a18478..36a2b04 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"react-google-recaptcha": "^3.1.0",
"react-hook-form": "^7.51.2",
"react-intersection-observer": "^9.8.1",
+ "react-phone-input-2": "^2.15.1",
"react-redux": "^9.1.1",
"react-router-dom": "^6.22.3",
"swiper": "^11.1.0"
diff --git a/src/components/Contact/Form.jsx b/src/components/Contact/Form.jsx
index 87b7da7..4a5a1eb 100644
--- a/src/components/Contact/Form.jsx
+++ b/src/components/Contact/Form.jsx
@@ -29,6 +29,8 @@ import forml from "../../assets/images/forml.png";
import { Link } from "react-router-dom";
import ReCAPTCHA from "react-google-recaptcha";
import { contactUs } from "../../service/api";
+import PhoneInput from "react-phone-input-2";
+import "react-phone-input-2/lib/style.css";
const Contact = () => {
const {
@@ -45,6 +47,11 @@ const Contact = () => {
// const email = "rubix@gmail.com";
+ const preprocessPhoneNumber = (value) => {
+ // Remove any non-digit characters from the phone number
+ return value.replace(/\D/g, "");
+ };
+
const handleVerify = (token) => {
setRecaptchaToken(token);
};
@@ -58,6 +65,7 @@ const Contact = () => {
// reset();
// }
+ console.log(data.phone);
try {
const result = await contactUs(data);
if (result.status) {
@@ -432,7 +440,7 @@ const Contact = () => {
value: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
message: "Please enter a valid email address",
},
- required: true,
+ required: "Email ID is required",
})}
/>
{errors.email && (
@@ -453,34 +461,55 @@ const Contact = () => {
>
Phone*
- (
+
{errors.phone.message}
@@ -528,6 +557,7 @@ const Contact = () => {
+
)}
/>
diff --git a/src/components/SubnetsComponent/NewSubnetComp.jsx b/src/components/SubnetsComponent/NewSubnetComp.jsx
index 91ca45c..1df02be 100644
--- a/src/components/SubnetsComponent/NewSubnetComp.jsx
+++ b/src/components/SubnetsComponent/NewSubnetComp.jsx
@@ -462,7 +462,7 @@ export const NewSubnetComp = () => {
>
51.4 Million RBT
-