NITRR-Open-Source-Community / NOSC-Website

https://nosc.netlify.app
31 stars 65 forks source link

add validation for register form #132

Open Omar-Nabil opened 9 months ago

Omar-Nabil commented 9 months ago

i would like to work on this issue can you assign it to me @IshaanAdarsh

Omar-Nabil commented 9 months ago

@nown1ne can you tell me what is the validation in our application for registration form ?

nown1ne commented 9 months ago
Omar-Nabil commented 9 months ago

I addressed an issue in the registration form validation to ensure that user input is appropriately validated before submission. The following changes have been implemented:

Name Validation: Added validation for the name field to ensure it is not left blank. Display a validation message prompting the user to enter a name if the field is empty.

Email Validation: Implemented regular expression validation for the email field to ensure a valid email format. Displays a validation message if an invalid email format is detected.

Phone Number Validation: Set a minimum length requirement of 8 digits for the phone number field. Displays a validation message if the entered phone number is less than 8 digits.

Password Validation: Set a minimum length requirement of 8 characters for the password field. Displays a validation message if the password length is below the specified limit.

Confirm Password Validation: Implemented a check to ensure that the confirmation password matches the original password. Displays a validation message if the confirmation password does not match.

Submit Button Validation: Created a function to validate all form fields when the user attempts to register. Calls individual validation functions for each field.

These changes aim to enhance the user experience by providing clear feedback on registration form errors, helping users correct their input before submission.

Omar-Nabil commented 9 months ago

i edited it can you check it ? @nown1ne https://github.com/NITRR-Open-Source-Community/NOSC-Website/pull/138

Omar-Nabil commented 8 months ago

https://github.com/NITRR-Open-Source-Community/NOSC-Website/pull/148