Skip to content

Bug: Member-name form allows whitespace-only and over-100-character names rejected by its own backend #3587

Closed

Description

@yannickmonney

P3 · Reproduced locally against 44e0dcf254975286c0e9dea443b5cd1ca6b23347. No production testing.

Predictably invalid names produce backend refusals rather than actionable inline validation. Retaining the dialog would not fix this rule mismatch.

Reproduction:

  1. Open Edit member and replace Name with three spaces, then Save.
  2. Repeat with a 101-character name.

Expected: Apply the server trim and 1–100-character rule locally and show an inline Name error before sending.

Observed: Both values reach updateMemberDisplayName; UI only uses z.string().min(1), no trim/max, while server route caps 100 and service rejects blank after trim. Name input does not render formState.errors.

Evidence: Actual form/RHF probe submits whitespace and 101 chars to the mutation; source confirms both server refusal conditions.

Verification: Independently reran the five relevant observation/control tests; all passed. The actual dialogs and their form state execute in jsdom. The shared form editor preserves a newer pending-save draft in the control.

Proof boundary: Mutation is mocked successful to observe both submitted payloads; server validation traced directly, not called against a database.

Source:

Deduplication: Cached issue titles searched member/name/validation. GitHub search "member whitespace": [] GitHub search "member display name blank": only unrelated #3019

Acceptance: Reproduce the triggering sequence with a regression test, preserve the editable draft or refuse invalid input as described above, and retain the successful-save control.

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

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions