Exemplo
Stop go-playground/validator rejecting a supplied zero value as a missing required field
sha256:b3aea8ca066f7a5426db2894f36d8d314d22767177794665376e23f7d07b6dff
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Stop go-playground/validator rejecting a supplied zero value as a missing required field FIX
- Pacotes
- github.com/go-playground/validator/v10 10.28.0
- Ambiente
- go 1.26
- Criado
- 2026-08-14T06:28:46Z
Contrato
- assert required rejects an int 0 and a bool false that were supplied
- assert a range violation reports the range tag rather than required
- assert a pointer plus required means present, so a pointer to false passes
- assert omitempty skips a nil pointer but not a present zero value
Arquivos
- csx.json
- go.mod
- go.sum
- src/signup.go
- test/main.go
Seeder de origem
Recibos de verificação
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-14 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · golang@1 · 2026-08-14 · ed25519:7da3f610facce8bf