bootstack.validation.ValidationRule#
- class bootstack.validation.ValidationRule(rule_type, message='', **kwargs)#
Bases:
objectA single validation rule that can be applied to a string value.
Supports the built-in rule types
'required','email','stringLength','pattern','compare', and'custom', and carries a trigger policy that controls when the rule is evaluated.- trigger#
When the rule fires —
'always','key','blur', or'manual'.- Type:
RuleTriggerType
- params#
Additional parameters specific to the rule type (e.g.,
min/maxfor'stringLength',patternfor'pattern',other_fieldfor'compare',funcfor'custom').- Type: