feat(valid)!: promote to v1.0.0 — JSON tag name resolution, bump xerrors to v1.0.0

Resolve JSON tag name resolution roadmap item: field names in error context
now use the json struct tag when available, falling back to the Go field name.
Commits MessageProvider interface as stable. Bumps xerrors dependency from
v0.9.0 to v1.0.0. API committed as stable.
This commit is contained in:
2026-05-11 18:18:05 -06:00
parent 328b80c060
commit ab11fd2ace
4 changed files with 35 additions and 4 deletions

View File

@@ -5,6 +5,25 @@ All notable changes to this module will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.0] — 2026-05-12
### Added
- JSON tag name resolution — field names in error context now use the `json`
struct tag when available (e.g. `"email_address"` instead of `"EmailAddress"`),
falling back to the Go field name when no json tag is defined or the tag is `"-"`.
### Changed
- `xerrors` dependency bumped from v0.9.0 to v1.0.0.
### Unchanged
All existing API (`Validator`, `New`, `WithMessageProvider`, `MessageProvider`,
`DefaultMessages`, `SpanishMessages`) is API-compatible with v0.9.0.
[1.0.0]: https://code.nochebuena.dev/go/valid/releases/tag/v1.0.0
## [0.9.0] - 2026-03-18
### Added