Ozzo Validation Versions Save

An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.

v4.3.0

3 years ago
  • #128 Added the capability of validating a dynamic map whose structure is specified via validation rules
  • #130 Added the support for context-aware validation for When and Each rules

Thanks to @NathanBaulch for the great contribution!

v4.2.2

3 years ago
  • #114 Fallback to field name for ignored JSON fields (thanks to @seriousben!)
  • #123 Added Skip.When() to support conditional skipping validation rules (thanks to @maratori!)

v4.2.0

3 years ago
  • Upgraded govalidator to v10 and added the EmailFormat validation rule to validate an email address without checking the existence of MX record
  • Fixes #103: Modified the reDomain regex to support upper/lowercase for the is.Domain rule. (thanks to @TheSecEng)
  • Fixes #105: fixed typo of ErrCurrencyCode (thanks to @maratori)
  • Fixes #106: Added the Nil and Empty rules (thanks to @samber)
  • Fixes #107: Added the Else clause to the When conditional validation construct (thanks to @samber)
  • Fixes #109: Fixed the bug in the Length rule when requiring zero length (thanks to @0perl)
  • Fixes #110: RequiredRule struct is made public (thanks to @erdaltsksn)

v4.1.0

4 years ago
  • #95, #96: Added validation.When() and validation.Required.When() to support conditional validation. Thanks to @mehran-prs for the great contribution to this new feature!

v4.0.0

4 years ago
  • #91: Updated all built-in validation rules to use validation.Error as the validation error type. It supports error code and parameter placeholders in error messages, which allows checking validation errors programmatically and translating error messages based on error codes. Thanks to @mehran-prs for the great contribution to this new feature!
  • Improved the performance of Errors.Error(). Thanks to @geekflyer for the profiling work and code contribution!

v3.8.1

4 years ago
  • Fixes #72: The validation.In rule now supports less restrictive equality comparison by using reflect.DeepEqual()
  • Fixes #63: Built-in validation rules are created as structs instead of pointers to improve memory usage performance

v3.8.0

4 years ago

Added support for context-aware validation.

v3.7.0

4 years ago

Added support for go mod

v3.6.0

4 years ago
  • Add validation rule for ISO 4217 currency code (#70)
  • Add Each() method for validating iterables. (#71)

v3.5.0

5 years ago
  • Added MultipleOf rule (see #49)
  • Better error message for Length rule when Min and Max are the same
  • Bumped up Go version requirement to 1.8 and above