• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

go-playground / validator / 40376431493
73%
v8: 100%

Build:
Build:
LAST BUILD BRANCH: fix/duration-translations
DEFAULT BRANCH: v8
Ran 26 Oct 2026 06:18PM UTC
Jobs 1
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Oct 2026 06:17PM UTC coverage: 72.569%. Remained the same
40376431493

push

github

web-flow
docs: fix stale alias, uuid and snippet details in package docs (#1679)

## Fixes Or Enhances

I ran the doc.go claims and snippets against current master and found a
few places where the docs no longer match the code. This PR only changes
docs and comments.

- `uuid`: doc.go says uppercase UUIDs will not pass. Since #1551 the
`uuid` regex accepts `A-F`.
`validate.Var("6BA7B810-9DAD-11D1-80B4-00C04FD430C8", "uuid")` returns
nil. I removed that note. `uuid3`/`uuid4`/`uuid5` still reject
uppercase, so their notes stay.
- `iscolor`: the alias is `hexcolor|rgb|rgba|hsl|hsla|cmyk` since #1528,
but doc.go, the `FieldError.Tag()`/`ActualTag()` comments in errors.go
and the comments in `_examples/simple` and `_examples/translations`
still list it without `cmyk`. Running `go run ./_examples/simple` prints
`hexcolor|rgb|rgba|hsl|hsla|cmyk` as the ActualTag.
- `eu_country_code`: it is in `bakedInAliases` but missing from the
alias lists in doc.go and README. I added it next to `country_code`.
`validate.Var("DE", "eu_country_code")` returns nil and `"US"` fails.
- The `t := &Test{ TestField: "Test" }` literals in the "Non standard
validators" and "Panics" snippets are missing a trailing comma, so they
don't compile (`syntax error: unexpected newline in composite literal`).
With the comma, both snippets build and run: the first returns nil and
the second panics with `Undefined validation function
'nonexistentfunction' on field 'TestField'`, as documented.
- The cross-field note mentions `validate.Field(field, tag)`, which no
longer exists. I changed it to `validate.Var(field, tag)`. With `Var`,
`fl.Top()` is the field itself, not nil. I checked this with a custom
validator that prints `fl.Top()`.

`go vet .` and `go test ./...` pass.

**Make sure that you've checked the boxes below before you submit PR:**
- [ ] Tests exist or have been written that cover this particular
change.

This is a docs and comments only change, so there is no new test.

Per CONTRIBUTING: t... (continued)

15013 of 20688 relevant lines covered (72.57%)

89.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40376431493.1 26 Oct 2026 06:18PM UTC 36
72.57
GitHub Action Run
Source Files on build 40376431493
  • Tree
  • List 36
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 29d05a7a on github
  • Prev Build on master (#40375987763)
  • Next Build on master (#40376692636)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc