Releases: marrow16/valix
Releases · marrow16/valix
v1.10.4
General code tidying
Also fix conditional constraint v8n parse (for Others
field)
v1.10.3
Improved conditional constraint - ConditionalConstraint
can now optionally also use an Others
expression - where the wrapped constraint is only checked when the others property expression evaluates to true
v1.10.2
Improved tag constraint field abbreviating
Also added ConditionalConstraint
and ConstraintSet
to constraint registry (making them available as v8n
tags)
v1.10.1
Added StopOnFirst
to PropertyValidator - individual property validator can now be instructed to stop on first constraint violation.
Also, v8n tags now allow abbreviated and shortened constraint arg names
v1.10.0
- Added
Only
to PropertyValidator (and v8n tags) now supports "only property" (see README)
- Ability to create
PropertyValidator
using v8n tags (using NewPropertyValidator()
or CreatePropertyValidator()
)
- Added
PropertyValidator.Validate()
method
- Minor bug fixes
v1.9.12
Provider overrides
- Improved decoder overrides (added
NewDecoderFor
func on interface DecoderProvider
)
- Added
DefaultPropertyNameProvider
- allows behaviour of struct fields to property name to be overridden
- Added default providers nil protection
v1.9.11
Added RequestQueryValidate
& RequestQueryValidateInto
validator methods - enables request query parameters to be validated
v1.9.10
The ArrayOf
constraint now has a field Constraints
which is an optional slice of constraints that are checked for each element.
Also made ArrayConditionalConstraint
available in v8n tags
v1.9.9
Compare constraints to other property now allows array indexing in the property path.
Also added constraints:
NotEmpty
ArrayConditionalConstraint
v1.9.8
Compare constraints to other property now allows dot notation - to compare against properties up and down the object tree.