Skip to content

Add schema validation to the guild/community creation form #287

Description

@Lakes41

Difficulty: Intermediate
Type: bug

Background
The /guilds page allows creating new guilds/communities, but form fields (name, description, member limits) currently appear to lack structured validation before being written to mock state.

Problem
Invalid guild data (empty names, oversized descriptions, negative member caps) can be submitted, producing malformed entries in the mock data store and inconsistent UI states.

Expected outcome
The guild creation/edit form validates all fields client-side with clear inline error messages before submission is accepted.

Suggested implementation

  • Introduce zod (or similar) schema for the guild creation payload.
  • Wire the schema into the form via react-hook-form + a zod resolver, or manual validation if the form is not already using a form library.
  • Show field-level error messages and disable the submit button while invalid.
  • Add the same schema to packages/integration-client if guild types are shared, so validation logic can be reused.

Acceptance criteria

  • Empty/invalid name is rejected with a clear message
  • Description length limit enforced
  • Member cap must be a positive integer
  • Valid submissions still create guilds correctly

Likely affected files/directories

  • apps/dashboard/app/guilds/
  • packages/integration-client/

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesOfficial Campaign | FWC26Official FWC26 campaign issue — eligible for campaign scoring and rewardsbugConfirmed defect or incorrect behavior that needs to be fixedintermediateIntermediate difficulty tasks requiring solid experience and some context

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions