call method

Map<String, dynamic>? call(
  1. AbstractControl control
)

Implementation

Map<String, dynamic>? call(AbstractControl control) {
  if (_validator == null) {
    final numDelegates = _delegates.length;
    if (numDelegates == 0) return null; // No validation needed
    // Set _validator once right before it is needed instead of on
    // every add/remove to increase performance. Also short circuit compose
    // when there is only one value as that has a performance cost.
    _validator =
        numDelegates > 1 ? Validators.compose(_delegates) : _delegates.single;
  }
  return _validator!(control);
}