Custom validator for SimpleLevels parameter form not called

CMK version: 2.3.0p11
OS version:Ubuntu 22.04 LTS

Problem: I have created a rule which uses the SimpleLevels form spec to configure a set of levels. The form works like a charm, but the function specified with the “custom_validate” parameter is never called. I would like to use this validator to check if the warning/critical levels are correctly specified (warning < critical for ascending metrics, or critical < warning of descending metrics).

Code snippet:

....
DictElement(
    parameter_form = SimpleLevels[float](
        title = title,
        help_text = help_text,
        level_direction = level_direction,
        prefill_fixed_levels = DefaultValue(defaults),
        form_spec_template = Float(
            unit_symbol = unit,
        ),
        custom_validate = (validate_levels_lower,),
    ),
    required = True,
)
....

The “validate_levels_lower()” function is never called. Does anyone have a clue what causes this behavior?

This issue will be fixed in Werk 17876.