Releases: go-ozzo/ozzo-validation
Releases · go-ozzo/ozzo-validation
v3.4.0
- 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
- #33: Added
RuneLength
validation rule to support validating the rune length of a string
v3.2
Fixes #29: Added support for differentiating internal errors from validation errors.
v3.1
- Fixes #24: Better support for validating struct with embedded structs.
v3.0.2
- Fixes #22: incorrect struct field name in errors if struct json tag includes omitempty
v3.0.1
- Fixes #15: validating a nil pointer struct field will cause panic
v3.0
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
- Replaced import path of
govalidator
with github.com/asaskevich/govalidator
v2.0
- 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.