Skip to content

Wire register and login forms to TanStack Form and generated Zod #41

Description

@ExtraToast

What to build

The register and login forms validate from the generated schemas, and the hand-written duplicates are deleted.

The spec already carries every structural rule those hand-written schemas restate — the username length bounds and pattern, the email format, the password minimum. What it cannot carry is the password-confirmation rule and the wording, so the form supplies exactly those two things and nothing else.

One consequence worth knowing before wiring this up: the generated client validates outbound request bodies too, so a submission that violates the contract fails before it reaches the network.

Acceptance criteria

  • Both forms derive their structural rules from the contract
  • Cross-field rules and estate-standard wording still apply
  • The hand-written schema files are deleted
  • Server-side validation failures still map onto the right fields

Blocked by

  • Add withEstateMessages and the TanStack Form v1 peer
  • Move every auth-ui operation onto the globally configured client

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authAuthentication, authorization, sessions, or identity.component: uiUser interface component or frontend application.priority: P2Medium; normal planned work.type: refactorCode structure change without intended behavior change.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions