# Macro for checking predicates

**URL:** <https://discourse.julialang.org/t/macro-for-checking-predicates/62603>\
**Category:** General Usage\
**Created:** [June 9, 2021, 2:47am UTC](https://discourse.julialang.org/t/macro-for-checking-predicates/62603 "2021-06-09T02:47:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [June 9, 2021, 2:47am UTC](https://discourse.julialang.org/t/macro-for-checking-predicates/62603/1 "2021-06-09T02:47:12Z")

</div>

Is there a macro that behaves like `@assert`, showing the contents on failure, but isn’t [disabled by optimization](https://docs.julialang.org/en/v1/base/base/#Base.@assert), so it can be used for validation?

It seems like it would be useful in a lot of cases but I can’t find a package for it.
