#@ load("@ytt:assert", "assert")

#@assert/validate min_len=5, when=lambda v: fail("error from within lambda")
foo: bar

+++

ERR:
Validating foo: Failure evaluating when=: fail: error from within lambda