Skip to content

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Fixed [FromForm(Name="form-custom-kebab")] generating code that looks up form_custom_kebab instead of form-custom-kebab
  • Added variable.Name = key in the string and string[] branches of TryFindOrCreateFormValue() to match the pattern used by all other branches and by TryFindOrCreateQuerystringValue()
  • Added test endpoint and integration test verifying hyphenated form names work correctly

Test plan

  • New test from_form_respects_custom_kebab_name passes
  • All from_form_binding tests pass (11 passed, 2 skipped)
  • All using_form_parameters tests pass (28 passed, 8 skipped)

Closes #2064

🤖 Generated with Claude Code

…Closes GH-2064

The string and string[] branches in TryFindOrCreateFormValue() were not
restoring variable.Name after ReadHttpFrame sanitized hyphens to underscores,
causing [FromForm(Name="form-custom-kebab")] to look up "form_custom_kebab".

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.

FromForm's Name is not respected for retrieving the form field

1 participant