Commit 6b26c775 by Madhankumar

mobile number validation

parent face2c7e
...@@ -24,11 +24,11 @@ function Login({ onSubmit }) { ...@@ -24,11 +24,11 @@ function Login({ onSubmit }) {
placeholder="Enter Mobile" placeholder="Enter Mobile"
type="tel" type="tel"
required required
// onKeyPress={(event) => { onKeyPress={(event) => {
// if (!/[0-9]/.test(event.key)) { if (!/[0-9]/.test(event.key)) {
// event.preventDefault(); event.preventDefault();
// } }
// }} }}
maxLength={10} maxLength={10}
onChange={(e) => setMobile(e.target.value)} onChange={(e) => setMobile(e.target.value)}
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment