Skip to content

Conversation

@ProgrammerSONGBIT
Copy link

@ProgrammerSONGBIT ProgrammerSONGBIT commented Jan 7, 2026

Added validation helpers for mentor input and integrated them into the registration process. Ensured that name and email fields are validated and trimmed before creating or updating mentor records.
Changes =

  • Add ValidateMentorInput() helper for consistent validation
  • Add IsValidEmail() helper for email format validation
  • Validate name: required, 2-100 characters
  • Validate email: required, valid format, max 255 characters
  • Sanitize input with strings.TrimSpace()
  • Return 400 Bad Request for validation failures
  • Log validation errors for debugging

Added validation helpers for mentor input and integrated them into the registration process. Ensured that name and email fields are validated and trimmed before creating or updating mentor records.

Signed-off-by: ProgrammerSONGBIT <[email protected]>
@ProgrammerSONGBIT
Copy link
Author

ProgrammerSONGBIT commented Jan 8, 2026

LGTM
I will remove the comments if you suggest ?

@ProgrammerSONGBIT
Copy link
Author

@dipamsen I added validation helpers for mentor input and integrated them into the registration process.

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.

1 participant