Skip to content

fix: prevent multistep invalid style leakage#1729

Open
justin-schroeder wants to merge 1 commit into
release/2.0.1from
fix/1208-multistep-valid-borders
Open

fix: prevent multistep invalid style leakage#1729
justin-schroeder wants to merge 1 commit into
release/2.0.1from
fix/1208-multistep-valid-borders

Conversation

@justin-schroeder
Copy link
Copy Markdown
Member

Fixes #1208.

What changed

  • Stops structural multi-step and step containers from exposing aggregate data-invalid/data-errors attributes.
  • Keeps invalid state on the actual invalid child inputs, preventing parent multistep state from activating descendant invalid variants on valid fields.
  • Adds a regression test that submits an invalid multistep form and verifies valid child inputs do not inherit parent invalid styling state.

Verification

  • pnpm exec vitest run --config /tmp/formkit-vitest-ci.mts packages/addons/__tests__/multistep.spec.ts -t "#1208" --reporter verbose
  • pnpm exec vitest run --config /tmp/formkit-vitest-ci.mts packages/addons/__tests__/multistep.spec.ts --reporter verbose
  • pnpm exec vitest run --config /tmp/formkit-vitest-ci.mts packages/addons/__tests__ --reporter verbose
  • pnpm vitest --typecheck.only --run

Local build note

  • node scripts/cli.mjs --script build addons still fails during DTS generation on the existing local @formkit/auto-animate package exports/type-resolution issue.

Security

  • No new user-controlled execution paths or HTML injection surfaces; this only removes aggregate state attributes from structural addon containers.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant