Skip to content

v0.5.0

Choose a tag to compare

@carlosforero carlosforero released this 23 Jul 23:00
· 103 commits to master since this release
f74e7fe

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 error interface
  • Perfect for idiomatic error handling and integration with Go's native error system

ToValgoError() Function

  • Returns validation errors as a concrete *valgo.Error type
  • 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

📚 Quick Migration

Before (deprecated):

val.Error() // Will be removed in v1.0

After:

val.ToError()      // For standard error handling
val.ToValgoError() // For detailed error information

Full Changelog: v0.4.2...v0.5.0