Skip to content

fix: align registerSchema bio/description validation with User model constraints - #982

Open
Rishikapurbey wants to merge 1 commit into
Shivayan09:mainfrom
Rishikapurbey:fix/register-schema-bio-description-validation
Open

fix: align registerSchema bio/description validation with User model constraints#982
Rishikapurbey wants to merge 1 commit into
Shivayan09:mainfrom
Rishikapurbey:fix/register-schema-bio-description-validation

Conversation

@Rishikapurbey

Copy link
Copy Markdown
Contributor

Fixes #878

Summary

Fixes the validation inconsistency between registerSchema and the User model for bio and description.

Changes Made

  • Made bio optional in registerSchema to match the model default value ("").
  • Made description optional in registerSchema to match the model default value ("").
  • Added .max(30) validation for bio to align with the model constraint.
  • Added .max(200) validation for description to align with the model constraint.

Why

The User model treats bio and description as optional profile fields with empty string defaults, but the registration validator required both fields. This prevented users from registering without providing them. Additionally, the validator did not enforce the same maximum length limits defined in the model.

Result

The registration validator is now consistent with the User model, allowing registration without bio or description while still enforcing the correct character limits.

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

@Rishikapurbey is attempting to deploy a commit to the Shivayan's projects Team on Vercel.

A member of the Team first needs to authorize 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.

[Bug] registerSchema validator inconsistency — bio/description required at registration but model allows empty, and missing maxlength validation

1 participant