Skip to content

1.5.0

Choose a tag to compare

@tessoir tessoir released this 10 Dec 13:04
· 625 commits to main since this release

Full Changelog: 1.1.0...1.5.0

Features:

  • ValidationExceptionExtension:
    • ValidationException?.onInvalid: Executes given lambda if the receiver is not null, returns receiver unchanged
    • ValidationException?.onValid: Executes given lambda if the receiver is null, returns receiver unchanged
    • ValidationException?.fold: Takes two lambdas onValid, onInvalid. Has same logic as two functions above. Returns the result from those lambdas
    • ValidationException?.throwIfPresent: Throws the receiver exception if it is not null

Breaking changes:

  • ThrowingValidator: object -> class
  • validateFirst now returns ValidationException?