chore(forms): remove unused vee-validate; formalize ref+validators+Zod as canonical pattern

Strict-regex sweep of apps/app/src/ confirms zero VeeValidate usage:
no `from 'vee-validate'` imports, no <Field|Form|ErrorMessage>,
no defineRule(), no useForm(). The 15 prior fuzzy matches were
false positives where /useForm/ matched useFormDraft/useFormSteps/
useFormSchemas/useFormFailures.

Changes:
- Remove `vee-validate` and `@vee-validate/zod` from apps/app/package.json
- Regenerate pnpm-lock.yaml (no other deps shifted)
- CLAUDE.md "Forms": replace VeeValidate prescription with the actual
  ref + @core/utils/validators + Zod-payload-schema pattern that the
  codebase already uses everywhere
- VUEXY_COMPONENTS.md: correct the stale "Registration uses VeeValidate"
  claim (the page actually uses useFormDraft + validators); update the
  "Form validation" reference row
- BACKLOG.md: close VEE-001 with the audit trail

All 319 existing tests still pass; vue-tsc clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-09 03:21:49 +02:00
parent 3616b06206
commit 5c53dcd2e4
5 changed files with 43 additions and 39 deletions

View File

@@ -430,9 +430,12 @@ Two approaches from Vuexy:
- StatusCard shows different UI per approval status (pending/approved/rejected)
- Conditional tab visibility based on approval status
#### Registration (Multi-step Form with VeeValidate + Zod)
#### Registration (Multi-step Public Form)
**Reference:** `apps/app/src/pages/register/[public_token].vue`
- VForm with VeeValidate field binding + Zod schemas from `@/schemas/`
- VForm + `useFormDraft` composable for state, autosave, idempotency-key drafts
- Per-field validators from `@core/utils/validators` (`emailValidator`, `requiredValidator`)
- Zod schemas in `apps/app/src/schemas/registrationSchema.ts` validate the
outgoing payload at submit time
- Conditional form fields based on event configuration
- Real-time email duplicate checking
- Password creation for new users
@@ -480,7 +483,7 @@ Preferred Vuetify components for common needs. Use these, not custom solutions.
| Menu / dropdown actions | VMenu + VList + VListItem | Custom popover |
| Drag-and-drop lists | `vuedraggable` (external library) | Custom drag logic |
| Rich text editing | TiptapEditor (@core) | Custom editor |
| Form validation | VForm ref + `@core/utils/validators` + API error mapping | (VeeValidate + Zod only in portal registration) |
| Form validation | VForm ref + `@core/utils/validators` + Zod schema for payload + API 422 error map | VeeValidate (removed; was never actually adopted) |
| Multi-step wizard | AppStepper (@core) | Custom step logic |
| Drawer header | AppDrawerHeaderSection (@core) | Custom header |
| Code display | AppCardCode (@core) | Custom code block |