src/Templates/Validator/Filter.phptpl
{% if skipTransformedValuesCheck %}{{ skipTransformedValuesCheck }} && {% endif %}
(
{% if typeCheck %}{{ typeCheck }} || {% endif %}
(function (&$value) use (&$transformationFailed): bool {
// make sure exceptions from the filter are caught and added to the error handling
try {
$value = \{{ filterClass }}::{{ filterMethod }}($value, {{ filterOptions }});
} catch (\Throwable $filterException) {
{% if isTransformingFilter %}
$transformationFailed = true;
{% endif %}
{{ viewHelper.validationError(filterValueValidator) }}
}
return false;
})($value)
)