Catch up on the latest product updates, best practices, and expert insights from the Checkmk Conference #12 – Watch the livestream recordings now

Werk #16640: Ruleset API: Improve custom validation

Component Checks & agents
Title Ruleset API: Improve custom validation
Date Mar 14, 2024
Level Trivial Change
Class Bug Fix
Compatibility Incompatible - Manual interaction might be required
Checkmk versions & editions
2.4.0b1 Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT
2.3.0b4 Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Ultimate MT

To better support the combination of different validation functions, FormSpecs now expect a sequence of validation functions instead of just one for custom_validate.

The validation of empty inputs is now handled in the new validator LengthInRange instead of DisallowEmpty. If you used

custom_validate=DisallowEmpty()

before, use

custom_validate=LengthInRange(min_value=1)

now. For consistency, InRange is renamed to NumberInRange

To the list of all Werks