Logo
Explore Help
Sign In
go/valid
1
0
Fork 0
You've already forked valid
Code Issues Pull Requests Packages Releases 1 Activity
Files
328b80c06097d251bf85717f9845ed4f3e6819cf
valid/compliance_test.go

11 lines
306 B
Go
Raw Normal View History

feat(valid): initial stable release v0.9.0 Struct validation backed by go-playground/validator/v10 with xerrors integration and pluggable i18n message providers. What's included: - Validator interface with Struct(v any) error method - New(...Option) constructor with WithMessageProvider functional option - MessageProvider interface for i18n; DefaultMessages (EN) and SpanishMessages (ES) built in - ValidationErrors mapped to xerrors.ErrInvalidInput with field and tag context keys - InvalidValidationError (non-struct input) mapped to xerrors.ErrInternal - Full playground.ValidationErrors attached via WithError for callers needing all failures Tested-via: todo-api POC integration Reviewed-against: docs/adr/
2026-03-18 21:02:26 +00:00
package valid_test
import "code.nochebuena.dev/go/valid"
// Verify New returns a Validator.
var _ valid.Validator = valid.New()
// Verify DefaultMessages and SpanishMessages satisfy MessageProvider.
var _ valid.MessageProvider = valid.DefaultMessages
var _ valid.MessageProvider = valid.SpanishMessages
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 17ms Template: 1ms
English
English
Licenses API