Skip to content

docs: clarify fieldexcludes behavior - #1610

Open
1678092075 wants to merge 1 commit into
go-playground:masterfrom
1678092075:docs/clarify-fieldexcludes
Open

docs: clarify fieldexcludes behavior#1610
1678092075 wants to merge 1 commit into
go-playground:masterfrom
1678092075:docs/clarify-fieldexcludes

Conversation

@1678092075

Copy link
Copy Markdown

Fixes Or Enhances

Fixes #663.

Clarifies the fieldexcludes documentation to match the current implementation:

  • the parameter names another struct field;
  • validation checks that the current field's string value does not contain that field's value;
  • validation succeeds when the referenced field cannot be resolved;
  • the package documentation now uses the registered fieldexcludes tag instead of the nonexistent excludesfield spelling.

No runtime behavior or public API changes.

Verification

  • go test -run '^TestFieldExcludes$' .
  • make test
  • golangci-lint v2.12.2 run
  • go doc .

AI assistance disclosure

AI assistance was used to search for a non-duplicated contribution candidate, inspect the implementation and existing tests, draft the documentation wording, and run verification commands.

Affected files: README.md and doc.go.

Human validation required before submission: review the final two-file diff, confirm the wording matches fieldExcludes and TestFieldExcludes, and confirm the commands above passed. The contributor remains responsible for the change and should be able to explain it without AI assistance.

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist that cover this behavior (TestFieldExcludes).

@go-playground/validator-maintainers

@1678092075
1678092075 requested a review from a team as a code owner August 13, 2026 08:42
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.

The documentation for excludesfield and fieldexcludes are confusing

2 participants