v0.5.0
What's Changed
✨ New Error Handling Functions
This release introduces two new error handling functions for better Go integration:
ToError() Function
- Returns validation errors as a standard Go
errorinterface - Perfect for idiomatic error handling and integration with Go's native error system
ToValgoError() Function
- Returns validation errors as a concrete
*valgo.Errortype - Provides access to rich, structured error details including per-field messages
Deprecated Error() Function
- The existing
Error()function is now deprecated and will be removed in v1.0 - This resolves naming conflicts with Go's error interface implementation convention
🔧 Other Changes
- Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by @dependabot[bot] in #37
- Fix minor typo in README by @carlosforero in #39
📚 Quick Migration
Before (deprecated):
val.Error() // Will be removed in v1.0After:
val.ToError() // For standard error handling
val.ToValgoError() // For detailed error informationFull Changelog: v0.4.2...v0.5.0