ruleFor method

AbstractRuleBuilder<Invoice> ruleFor(
  1. dynamic func(
    1. Invoice e
    ), {
  2. required String key,
  3. bool useKeyAsElementName = false,
})
inherited

Creates a new builder to represent a list of rules.

Implementation

AbstractRuleBuilder<E> ruleFor(dynamic Function(E e) func,
    {required String key, bool useKeyAsElementName = false}) {
  final AbstractRuleBuilder<E> builder = AbstractRuleBuilder<E>(
      expression: func, key: key, useKeyAsElementName: useKeyAsElementName);
  ruleBuilders.add(builder);
  return builder;
}