call method

  1. @override
bool call(
  1. dynamic object, {
  2. covariant C? cell,
  3. dynamic arguments,
  4. bool exception(
    1. TestRule<dynamic, Cell> rule,
    2. Exception e
    ) = TestRuleTrue.passed,
})

Executes the rule's validation logic.

Parameters:

  • object: The object being validated
  • cell: Optional cell context for the validation
  • arguments: Additional operation arguments
  • exception: Handler for any exceptions during validation

Returns true if validation passes, false if validation fails.

Implementation

@override
bool call(object, {covariant C? cell, arguments, bool Function(TestRule rule, Exception e) exception = TestRuleTrue.passed}) {
  try {
    if (object is E && cell != null && (arguments == null || arguments is Function)) {
      return element(object, cell, action: arguments);
    }
  } catch(_) {}
  return true;
}