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.

v3.4.0

5 years ago
  • Added Not-in rule (#40)
  • Added Sub-domain rule (#42)
  • Added domain rule (#43)
  • Added empty check support for time.Time (#48)
  • Added E164 phone rule (#46)

v3.3

6 years ago
  • #33: Added RuneLength validation rule to support validating the rune length of a string

v3.2

6 years ago

Fixes #29: Added support for differentiating internal errors from validation errors.

v3.1

7 years ago
  • Fixes #24: Better support for validating struct with embedded structs.

v3.0.2

7 years ago
  • Fixes #22: incorrect struct field name in errors if struct json tag includes omitempty

v3.0.1

7 years ago
  • Fixes #15: validating a nil pointer struct field will cause panic

v3.0

7 years ago

This release revamps the way of declaring struct validation rules, based on the discussion in #12. It introduces BC-breaking changes. Please refer to the upgrade instructions for more details.

The following changes are introduced in this major release:

  • A new way of declaring struct field validation rules. See #12 for more information.
  • Added Errors.Filter() to support composing arbitrary validation errors.
  • Replaced Range rule with two new rules: Min and Max.
  • Added validation.By() to support wrapping a function into a validation rule.

v2.2

7 years ago
  • Replaced import path of govalidator with github.com/asaskevich/govalidator

v2.1

7 years ago
  • Added Date validator.

v2.0

7 years ago
  • CHG: Removed the context parameter from the Rule.Validate() interface method. This is BC-breaking change. If your particular rule relies on the struct context, you may define it as a closure or pass the context during the rule creation.