Skip to content

Releases: go-ozzo/ozzo-validation

v3.4.0

22 Jun 16:56
Compare
Choose a tag to compare
  • 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

13 Sep 16:45
Compare
Choose a tag to compare
  • #33: Added RuneLength validation rule to support validating the rune length of a string

v3.2

03 Jul 18:25
Compare
Choose a tag to compare

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

v3.1

23 Mar 14:13
Compare
Choose a tag to compare
  • Fixes #24: Better support for validating struct with embedded structs.

v3.0.2

16 Mar 15:24
Compare
Choose a tag to compare
  • Fixes #22: incorrect struct field name in errors if struct json tag includes omitempty

v3.0.1

14 Feb 00:12
Compare
Choose a tag to compare
  • Fixes #15: validating a nil pointer struct field will cause panic

v3.0

12 Feb 19:35
Compare
Choose a tag to compare

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

08 Feb 18:24
Compare
Choose a tag to compare
  • Replaced import path of govalidator with github.com/asaskevich/govalidator

v2.1

08 Feb 01:37
Compare
Choose a tag to compare
  • Added Date validator.

v2.0

01 Aug 15:47
Compare
Choose a tag to compare
  • 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.