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

gookit / validate / 40861688826
91%

Build:
DEFAULT BRANCH: master
Ran 29 Oct 2026 10:58AM UTC
Jobs 6
Files 31
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:58AM UTC coverage: 91.149% (+0.5%) from 90.648%
40861688826

push

github

inhere
feat(validate): support a slice value in the in/not_in rules

The enum rules handed the whole slice to Enum, whose conversion to a basic type
fails, so `in:go,php` on a []string always failed and `not_in:go,php` always passed,
whatever the elements (#266).

- Enum walks every element of a slice/array: the value is in the enum when each
  element is. A nil element pointer is ignored.
- NotIn is not the plain inverse for a slice: no element may be in the enum, so
  `not_in:go,php` rejects ["go","java"] instead of accepting it.
- scalar values keep the old behaviour, and NotIn stays the inverse of Enum for them.

Also documents the string semantics of the numeric comparators: `min`/`max`
(`gt`/`gte`/`lt`/`lte`/`between`) compare a string value lexicographically, not by
length, so `min:3` passes for "ab" and fails for "1". `min_len`/`max_len` are the
length rules. The code comments said "string" for some of them and nothing for the
others; the README rows now spell it out and a test pins the behaviour.

Tests: enum with slices/arrays/pointer elements on both rules, the tag level
`in`/`not_in` on a []string and a []int, and the string comparison of min/max. The
two existing tests that pinned the old whole-slice behaviour are updated.

29 of 35 new or added lines in 1 file covered. (82.86%)

1 existing line in 1 file now uncovered.

4253 of 4666 relevant lines covered (91.15%)

5.97 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
76.47
76.47% internal/validators/enum.go

Coverage Regressions

Lines Coverage ∆ File
1
96.15
-1.31% internal/reflectx/reflectx.go
Jobs
ID Job ID Ran Files Coverage
1 Go-1.25 - 40861688826.1 29 Oct 2026 10:58AM UTC 31
88.24
GitHub Action Run
2 Go-stable - 40861688826.2 29 Oct 2026 10:58AM UTC 31
87.72
GitHub Action Run
3 Go-1.21 - 40861688826.3 29 Oct 2026 10:58AM UTC 30
89.75
GitHub Action Run
4 Go-1.23 - 40861688826.4 29 Oct 2026 10:58AM UTC 31
89.82
GitHub Action Run
5 Go-1.24 - 40861688826.5 29 Oct 2026 10:58AM UTC 31
88.24
GitHub Action Run
6 Go-1.22 - 40861688826.6 29 Oct 2026 10:58AM UTC 31
89.82
GitHub Action Run
Source Files on build 40861688826
  • Tree
  • List 31
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 32a88ba8 on github
  • Prev Build on master (#40852749034)
  • Next Build on master (#40864170708)
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