go-playground/form v4.5.1 - Slice decoding and encoding fixes


go-playground/form v4.5.1, published on October 31, 2026, fixes a decoder issue that repeats the first value when decoding a slice. For Go services that use form decoding before loading records into a data pipeline, that symptom deserves attention because repeated values can change the data a downstream job receives. This release is not marked as a prerelease.

The full release notes are on the GitHub release page.

The decoder correction in PR #88 addresses the repeated first value reported in the release notes. The announcement does not specify the complete set of affected slice shapes. Treat this as a concrete correctness fix and check the slice inputs your service actually accepts.

A useful regression fixture contains several distinct values. If every element has the same value, a test can miss the reported symptom entirely. Assert the decoded contents as well as the length. In an ingestion service, a list of source identifiers is one example where a repeated first element could send later processing toward the wrong records. That is a possible consequence of the symptom, not an incident reported by the project.

PR #89 adds rejection of slice indices that overflow the required length. This gives malformed indexed input a defined rejection point. The release notes do not provide the exact boundary or error text, so neither belongs in a claimed compatibility contract based on this announcement alone.

For services accepting indexed form fields, exercise an overflowing index through the request handler and check how the rejection reaches the caller. Keep ordinary indexed slices in that test run too. Both changes concern decoding, but they need separate assertions: one checks the values produced, while the other checks rejection of invalid input.

Custom key encoding changes in PR #85. When a custom key encoder produces no values, the encoder now skips that map entry. The condition is specific to the key encoding result; the release note does not describe a general rule for removing empty map values.

For a Go adapter that builds outbound form data from a map, this makes the callback result worth checking during an update. A callback that produces no key values now leads to omission of the entry. If the receiving service requires that field, inspect why the callback produced no values before treating the missing field as a transport problem.

Cover both outcomes in a fixture: a custom key that produces values and one that produces none. Compare which entries reach the encoded output. This is an observable output change, even though the release presents it as a fix.

PR #84 avoids a panic when encoding unexported embedded fields with omitempty. That combination is the documented trigger. The note does not claim a general change to all embedded fields or all uses of omitempty.

If an ingestion adapter uses such a struct for outbound encoding, add that actual struct shape to its regression cases. Check that encoding completes and inspect the resulting fields. A panic check alone would miss an unexpected output difference in a request sent to the next service.

The operational relevance depends on where encoding runs and how the caller handles panics. A request handler and a batch worker can expose different failure scopes. The release announcement establishes the encoder fix, but reports no production outage or measured throughput improvement. The reason to assess this update is the documented field handling failure.