From 30a7a079b16e1d17e8cc920d2fb3338f79767432 Mon Sep 17 00:00:00 2001
From: Blaster4385 <venkateshchaturvedi12@gmail.com>
Date: Fri, 12 Aug 2022 08:44:33 +0530
Subject: Add form validators and country api

---
 client/src/components/Input/Input.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'client/src/components/Input/Input.jsx')

diff --git a/client/src/components/Input/Input.jsx b/client/src/components/Input/Input.jsx
index 5987e27..08e8fab 100644
--- a/client/src/components/Input/Input.jsx
+++ b/client/src/components/Input/Input.jsx
@@ -1,7 +1,7 @@
 import React from 'react'
 import styles from './Input.module.css'
 
-const Input = ({ label, id, value, type, name, onChange, placeholder }) => {
+const Input = ({ label, id, value, type, name, onChange, placeholder, maxLength, pattern, minLength, onInvalid, onValid }) => {
   return (
     <div className={styles.input}>
       <div className={styles.input__container}>
@@ -15,6 +15,11 @@ const Input = ({ label, id, value, type, name, onChange, placeholder }) => {
           onChange={onChange}
           required
           placeholder={placeholder}
+          pattern={pattern}
+          maxLength={maxLength}
+          minLength={minLength}
+          onInvalid={onInvalid}
+          onValid={onValid}
         />
       </div>
     </div>
-- 
cgit 

