Commit 961375b
authored
docs: clarify fieldexcludes behavior (#1610)
## 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:**
- [x] Tests exist that cover this behavior (`TestFieldExcludes`).
@go-playground/validator-maintainers1 parent 74dd82a commit 961375b
2 files changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
| 806 | + | |
807 | 807 | | |
808 | | - | |
809 | | - | |
810 | | - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
811 | 812 | | |
812 | | - | |
| 813 | + | |
813 | 814 | | |
814 | 815 | | |
815 | 816 | | |
| |||
0 commit comments