Skip to content

Commit

Permalink
Merge pull request #18 from Urmi-Jana/fork1-urmijana
Browse files Browse the repository at this point in the history
Check if phone number has 10 digits along with country code
  • Loading branch information
chandel-aman authored Feb 10, 2023
2 parents 37a0a30 + 24bfe24 commit ecb69c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/LostForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const validate = (values) => {

if (!values.phone) {
errors.phone = "Required";
} else if (values.phone.length > 10) {
errors.phone = "Too Long!";
} else if (values.phone.length !== 14) {
errors.phone = "Invalid number";
}

if (!values.email) {
Expand Down

1 comment on commit ecb69c7

@vercel
Copy link

@vercel vercel bot commented on ecb69c7 Feb 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.