Werk #16640 · Mar 14, 24
Ruleset API: Improve custom validation
Incompatible change. Existing setups may behave differently after upgrading. Review the details below before updating.
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
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- Checks
- Versions:
- 2.4.0b1All Editions
- 2.3.0b4CommunityProUltimateUltimate + MT