Werk #16640: Ruleset API: Improve custom validation

Komponente Checks & agents
Titel Ruleset API: Improve custom validation
Datum 14.03.2024
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein
Checkmk versions & editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0b4 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

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

Zur Liste aller Werks