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

gookit / validate / 26226312343
96%

Build:
DEFAULT BRANCH: master
Ran 21 May 2026 12:36PM UTC
Jobs 6
Files 14
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

21 May 2026 12:36PM UTC coverage: 95.604% (-0.1%) from 95.701%
26226312343

push

github

web-flow
fix(validators): handle pointer fields in RequiredIf (#334) (#335)

RequiredIf silently skipped its check whenever either side of the rule
was a pointer:

  - When the destination field is a pointer (e.g. *bool), reflect.ValueOf
    returns a value of Kind Pointer. convTypeByBaseKind has no
    string-to-Pointer conversion, so dstVal == wantVal was never
    evaluated and the function fell through to default-True / skip.

  - When the source field is a pointer to a zero value (e.g.
    *string("")), val != nil && !IsEmpty(val) was true, so the
    rule's 'must be present and not empty' contract was not enforced.

Unwrap pointers on both sides: treat a nil pointer as the field being
absent (rule does not trigger, dependent field remains optional), and
treat a pointer to a zero value as the zero value itself for the
not-empty check. Adds five subtests covering each pointer scenario;
two of them fail on the old code and pass on the new code.

Closes #334

22 of 26 new or added lines in 1 file covered. (84.62%)

3001 of 3139 relevant lines covered (95.6%)

6.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
98.38
-0.56% validators.go
Jobs
ID Job ID Ran Files Coverage
1 Go-1.23 - 26226312343.1 21 May 2026 12:36PM UTC 14
95.6
GitHub Action Run
2 Go-stable - 26226312343.2 21 May 2026 12:37PM UTC 14
95.6
GitHub Action Run
3 Go-1.21 - 26226312343.3 21 May 2026 12:37PM UTC 14
95.6
GitHub Action Run
4 Go-1.22 - 26226312343.4 21 May 2026 12:36PM UTC 14
95.6
GitHub Action Run
5 Go-1.25 - 26226312343.5 21 May 2026 12:37PM UTC 14
95.6
GitHub Action Run
6 Go-1.24 - 26226312343.6 21 May 2026 12:36PM UTC 14
95.6
GitHub Action Run
Source Files on build 26226312343
  • Tree
  • List 14
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ad5894a3 on github
  • Prev Build on master (#25354608639)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc