subhashis2204 / project-annapurna

This is the project annapurna repository
https://project-annapurna.azurewebsites.net/
MIT License
10 stars 29 forks source link

Validation in ALL forms #119

Closed AlfiyaSiddique closed 1 year ago

AlfiyaSiddique commented 1 year ago

Description

Added inline validation in sign in, organization and contact form.

Fixes #93

Issue name: [FEATURE] Validation in Sign in, Contact and Organization Form

Checklist

subhashis2204 commented 1 year ago

Hey thanks for contributing to this project. You did a great job in introducing client side validation in the forms. Thank you once again.

AlfiyaSiddique commented 1 year ago

Hey thanks for contributing to this project. You did a great job in introducing client side validation in the forms. Thank you once again.

Glad to be a contributor of this project! Will try to contribute as much as possible.😊

subhashis2204 commented 1 year ago

Hey @AlfiyaSiddique , we have a bug in the form validation in contact us page

image

For the name part, I would suggest that you only validate that the name field should not be empty. Since people might have small names. Like 'Adah' or likewise. The second thing is that the email validation is not quite right. As you can see the email domain is correct but the validation is showing it incorrect.

I noticed the problem of email validation is in the sign up form as well. Can you fix this at the earliest.

image

And can you give me a brief idea about how you are validating the registration number.

Otherwise, everything seems okay.

AlfiyaSiddique commented 1 year ago

Hey @AlfiyaSiddique , we have a bug in the form validation in contact us page

image

For the name part, I would suggest that you only validate that the name field should not be empty. Since people might have small names. Like 'Adah' or likewise. The second thing is that the email validation is not quite right. As you can see the email domain is correct but the validation is showing it incorrect.

I noticed the problem of email validation is in the sign up form as well. Can you fix this at the earliest.

image

And can you give me a brief idea about how you are validating the registration number.

Otherwise, everything seems okay.

Sure, I'll fix all the issues right away and create a new pull request.

And about the registration number, there is an official pattern that is followed for the registration number of a company, non-profitable-organization or NGO, it is as followed

In totality, the Organisation Registration Number is 21 digits. The first digit of the CIN of the Organisation is denoted either with L or U. If L is the first digit then it means it’s a Listed organization and if U is mentioned then it is an Unlimited organization incorporated. The next five digits represent the type of industry to which the organization belongs. The next two digits are the state code characters where the organization has been registered. The next four digits are the year in which the organization was incorporated and formed under the Companies Act 2013. The next three digits are for knowing whether the organization is private limited or public limited as PLC would be written for Public Limited Company and PTC Private Limited Company. And the last six digits denote the ROC number that is issued by the ROC during the registration process of the company.

For Example: U74140KA2020PTC136426. So I used regex to implement this.

AlfiyaSiddique commented 1 year ago

Hello @subhashis2204

Solve the above issues in PR #120 . Please give a review.