Skip to content

Bug: Form validation fires on first keystroke — unify validation timing across all forms #1943

Closed

Description

@yannickmonney

Problem

Typing the first character into a field (e.g. "New password") immediately shows a validation error. Validation should not fire while the user is first typing a field. This is a global issue across all forms, not just settings.

Current behavior

  • useFormEditor sets mode: 'onChange' (services/platform/app/components/ui/editor/use-form-editor.ts:74).
  • Direct useForm calls in dialogs also use mode: 'onChange', e.g. team-create-dialog.tsx:53, api-key-create-dialog.tsx:82, member-add-dialog.tsx:92, account-form.tsx:302.

Proposed change

  • Switch the default validation mode to onTouched (validate after first blur, then re-validate onChange) in useFormEditor, and audit/repoint every direct useForm call so behavior is consistent app-wide.
  • Consider exposing a single shared useForm wrapper/default so future forms inherit the behavior automatically and can't regress.

Acceptance criteria

  • No field shows a validation error on its first keystroke before blur/submit.
  • Behavior is identical across settings, dialogs, onboarding, chat, and any other forms.
  • A grep shows no remaining ad-hoc mode: 'onChange' that bypasses the shared default (or each remaining instance is explicitly justified).

Activity

  1. yannickmonney commented on Jul 2, 2026

    @yannickmonney
    ContributorAuthor

    Another confirmed instance from a QA todo sweep (2026-07-02): the sign-up form password field validates on the first keydown before any blur — same root cause (mode: 'onChange' default). Worth including the auth/sign-up forms explicitly in this issue's audit sweep alongside settings and dialogs.

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

    bugimprovementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions