Skip to content

feat: add proper form validation with Zod schemas to all forms (Closes #477) - #590

Open
waterWang wants to merge 1 commit into
Protocol-Guild:mainfrom
waterWang:feat/zod-form-validation-477
Open

feat: add proper form validation with Zod schemas to all forms (Closes #477)#590
waterWang wants to merge 1 commit into
Protocol-Guild:mainfrom
waterWang:feat/zod-form-validation-477

Conversation

@waterWang

Copy link
Copy Markdown

Description

Adds proper form validation with Zod schemas to all forms, as specified in #477.

Changes

  • New frontend/src/schemas.ts: Centralized Zod schemas for EmployeeEntry and PayrollScheduler forms
  • EmployeeEntry: Added Zod validation (fullName, email, walletAddress, role, currency) with inline error messages, blur validation, and submit button disabled while invalid
  • PayrollScheduler: Added Zod validation (employeeName, amount, frequency, startDate) with inline error messages, blur validation, and submit button disabled while invalid

Acceptance Criteria

  • Every form field has a Zod schema
  • Validation runs on blur and on submit
  • Error messages appear inline below each field
  • Submit button disabled while form is invalid

Notes

  • Uses only zod (already in dependencies) — no new dependencies added
  • No react-hook-form required — implemented with plain Zod + React state
  • Settings page already has no form (only a language selector dropdown), so no changes needed there

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