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

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

Build:
Build:
LAST BUILD BRANCH: fix/duration-translations
DEFAULT BRANCH: v8
Ran 29 Oct 2026 10:49PM 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

29 Oct 2026 10:49PM UTC coverage: 72.581% (+0.004%) from 72.577%
40968705535

push

github

web-flow
Add uuid7 validation tag (#1614)

## What type of PR is this?

- feature

## What this PR does / why we need it:

Adds a built-in `uuid7` validation tag for version 7 UUIDs (RFC 9562).

The library already validates UUID versions 3, 4 and 5, but there's no
tag
for v7. UUIDv7 has become common as a time-ordered, index-friendly
primary
key, so it's a natural addition to the existing set.

Changes, following the exact shape of the existing `uuid5` support:

- `regexes.go`: add `uUID7RegexString` / `uUID7Regex`. Same pattern as
v4/v5
with the version nibble pinned to `7` and the RFC 4122/9562 variant
nibble
  `[89ab]`.
- `baked_in.go`: add `isUUID7` and register the `uuid7` tag.
- `doc.go` and `README.md`: document the new tag.

Like `uuid4`/`uuid5`, `uuid7` accepts lowercase hex only. I left a
case-insensitive `uuid7_rfc4122`-style variant out of this PR to keep it
focused and because the right name for it (given v7 is defined in RFC
9562,
not 4122) is a call I'd rather leave to you — happy to add it in a
follow-up.

## Which issue(s) this PR fixes:

Fixes #1595

## Testing

Added `TestUUID7Validation` mirroring the existing UUID tests: empty
input,
garbage prefix, wrong-version UUIDs (v3/v4), an invalid variant nibble,
an
uppercase value (rejected), and two valid v7 values. `go test ./...`
passes;
`go vet` is clean.

## Release Notes

```release-note
Add `uuid7` validation tag for RFC 9562 version 7 UUIDs.
```

Co-authored-by: Chris (ChrisJr404) <11917633+ChrisJr404@users.noreply.github.com>

3 of 3 new or added lines in 1 file covered. (100.0%)

15022 of 20697 relevant lines covered (72.58%)

90.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40968705535.1 29 Oct 2026 10:49PM UTC 36
72.58
GitHub Action Run
Source Files on build 40968705535
  • Tree
  • List 36
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 19397f23 on github
  • Prev Build on master (#40968509375)
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