or

suspend fun <T : Event> CheckContext<T>.or(body: Check<T>)

Convenience function allowing you to pass this check context, if the checks provided in the body pass – even if the check context is failing.

This will only run the given checks if the current check context has failed. It also resets the check context's passing state and failure message before running the given checks.

check {
someCheck()

or {
someOtherCheck()
}
}

If both checks provide a message, this function will combine them. Otherwise, it'll provide the message for whichever check provides one.

Note: As always, placing multiple checks within an or { } block will result in a block where all of the given checks must pass.