lugenx/ecohabit

Implement email and password validation with validator.js

Closed this issue · 6 comments

lugenx commented

Enhance the sign-up process by validating the email and password formats users enter by installing and using validator.js

Here are the steps:

  1. Install validator.js as a dependency.
  2. Add email validation to ensure it meets the standard format (e.g., user@example.com).
  3. Add password validation to ensure it meets our desired criteria (e.g., minimum length, presence of numbers, and special characters).
  4. Display appropriate error messages if the entered email or password doesn't meet the requirements.

May I work on this issue?

lugenx commented

@aryan-debug thank you for your help, because you have already another issue assigned and it's in progress, let's wait to get that merged. if this issue is not assigned to anybody else until then, I will assign this to you.

hey, can I work on this?

@lugenx what exactly is the desired criteria for a password in this case? Cause, validator.js already has an inbuilt function to check for a strong password, it's probably best to use that

lugenx commented

Assigned @vishwaszadte 👍

Also, thank you for the recommendation, I wasn't aware of that just checked, and yes, it's a great idea, let's use it. But let's modify the options and make upper and lowercase optional. let's change minLowercase and minUppercase to 0.

minLowercase: 0, 
minUppercase: 0

@lugenx sure, will do that