v0.9.0 ValidationPath and userContext
Features:
- Add
ValidationResult.errors
containingValidationError
with aValidationPath
to safely inspect and use validation error and paths - Add
constrain()
in ValidationBuilder as a replacement foraddConstraint
, directly allowingpath
anduserContext
to be set - Add
path()
in ValidationBuilder to adjust the reported validation path of a validation error - Add
userContext()
in ValidationBuilder to add any data to the reported validation error - Add various utilities to
Validation
andValidationResult
, or lists of them
Deprecations and breaking changes:
- Move constraints from
io.konform.validation.jsonschema
toio.konform.validation.constraints
, deprecations can be solved by replacing the import - Remove
ValidationBuilder.has
. Can be replaced by directly adding the validation in the builder - Deprecate
addConstraint()
, useconstrain()
instead. templateValues are not supported therein, directly add them to the hint.