From ad82110a6943ce40779869fe1c1f14d09d8c04c3 Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Mon, 11 May 2026 01:14:15 +0200 Subject: [PATCH] feat(login): migrate login form to FormField + Zod (F3 sample, validates FormField API) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the Vuetify VForm + AppTextField + VBtn stack with the F3 form pattern: @primevue/forms'
with a Zod resolver, the project-owned wrapper from B5, and PrimeVue InputText / Password / Checkbox / Button at the input layer. Surrounding chrome (VRow / VCol illustration column, VCard, VAlert reset-success banner, auth-logo link, MfaChallengeCard) stays Vuetify until F4b migrates the auth surface in full. Zod schema: - email: required, valid email format - password: required Both messages are Dutch (per F3 sprint plan convention). 422 error handling routes through useFormError() from B5. The Laravel response shape (errors.: string[]) feeds applyApiErrors directly. rate_limited and other reason-only failures are synthesized into the email field's error map so they surface visually under the email input, preserving the existing UX. The remember-me checkbox is rendered with PrimeVue Checkbox (no schema coverage — it's UI state, not validated input). The password visibility toggle is delegated to PrimeVue's Password component's built-in toggle-mask prop (replaces the previous manual isPasswordVisible ref and append-inner-icon plumbing). Verification: - pnpm typecheck — clean. - pnpm test — 402 tests pass unchanged. - pnpm build — succeeds; login chunk grew from ~21 KB to ~84 KB raw due to @primevue/forms + Password/Checkbox component code (gzip 22 KB). Will normalize during F4 as more pages share these modules. - Manual browser test deferred to Phase C brand-review screenshot capture. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/app/src/pages/login.vue | 201 ++++++++++++++++++----------------- 1 file changed, 102 insertions(+), 99 deletions(-) diff --git a/apps/app/src/pages/login.vue b/apps/app/src/pages/login.vue index 42ecb448..0384c735 100644 --- a/apps/app/src/pages/login.vue +++ b/apps/app/src/pages/login.vue @@ -1,5 +1,11 @@