Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comprehensive form validation for submission form #267

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Aryansinghparmar
Copy link
Contributor

This PR add client side form validation to the content submission form. Each form field is now validated for completeness and correctness, covering edge cases and providing clear feedback messages.

Enhancements -

Email Validation: Validates format against common patterns, covering edge cases to prevent invalid email entries.

Name Validation: Ensures name is between 3 and 25 characters, containing only letters and spaces.

Member Status: Ensures the user selects whether they are a member or not.

Content Type: Ensures the user selects a type of content, preventing empty submissions.

Drive Link Validation: Validates the link structure to ensure it is a valid Google Drive URL.

Proof of Ownership (Optional URL): If provided, checks that the proof field contains a valid URL.

Social Media Handle (Optional): Validates either an @username format or a URL link if a social handle is provided.

@ItsAnkan ItsAnkan linked an issue Dec 1, 2024 that may be closed by this pull request
Copy link
Member

Choose a reason for hiding this comment

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

🤔 wat.... why do we need it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please ignore it. maybe ye jab setup mein issue aarha tha toh gpt ke suggestions pe add kra hoga

Copy link
Member

Choose a reason for hiding this comment

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

acha, hataa dena usko

@destryptor
Copy link
Contributor

destryptor commented Dec 2, 2024

Looks fine to me, but yeah, it doesn't make sense to add ejs to the list of dependencies if it's not being used. Please remove it since we shouldn't be changing package.json just like that.

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.

Validators for forms
3 participants