withRule method
Schema
withRule(
- IValidationRule rule
inherited
Adds validation rule to this schema.
This method returns reference to this exception to implement Builder pattern to chain additional calls.
rule
a validation rule to be added. Returns this validation schema.
Implementation
Schema withRule(IValidationRule rule) {
_rules ??= <IValidationRule>[];
_rules!.add(rule);
return this;
}