Skip to content

Conversation

@aditiii23
Copy link
Owner

No description provided.

@vercel
Copy link

vercel bot commented Apr 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
virtual-permissions-frontend ✅ Ready (Inspect) Visit Preview Apr 15, 2023 7:49pm

let email = req.body.email?.toLowerCase()
const emailRegex = /^[^\s+@]+@[^\s@]+\.[^\s@]{2,}$/i
const phoneRegex = /^\+?\d{1,3}[- ]?\d{3}[- ]?\d{3}[- ]?\d{4}$/
if (!email?.length)

Choose a reason for hiding this comment

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

As we are using the same checks statement in signup as well as singin, we can move those lines to some utility file and use the function to check email and other similar stuff. You can also try to read something around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants