ruleFor method

RuleBuilder<T> ruleFor(
  1. String key
)

Starts a rule for the field identified by key and returns a builder to attach checks, a condition and a rule-set to it.

Implementation

RuleBuilder<T> ruleFor(String key) {
  final rule = _Rule<T>(key);
  _rules.add(rule);

  return RuleBuilder<T>._(rule);
}