github konform-kt/konform v0.9.0
v0.9.0 ValidationPath and userContext

latest releases: v0.10.0, v0.9.2, v0.9.1...
3 months ago

Features:

  • Add ValidationResult.errors containing ValidationError with a ValidationPath to safely inspect and use validation error and paths
  • Add constrain() in ValidationBuilder as a replacement for addConstraint, directly allowing path and userContext 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 and ValidationResult, or lists of them

Deprecations and breaking changes:

  • Move constraints from io.konform.validation.jsonschema to io.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(), use constrain() instead. templateValues are not supported therein, directly add them to the hint.

Don't miss a new konform release

NewReleases is sending notifications on new releases.