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

gookit / validate / 26226312343 / 4
96%
master: 96%

Build:
DEFAULT BRANCH: master
Ran 21 May 2026 12:38PM UTC
Files 14
Run time 2s
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.4

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

3001 of 3139 relevant lines covered (95.6%)

1.11 hits per line

Source Files on job Go-1.22 - 26226312343.4
  • Tree
  • List 14
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26226312343
  • ad5894a3 on github
  • Prev Job for on master (#25354608639.6)
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