getError method

dynamic getError(
  1. String errorCode, [
  2. List<String>? path
])

Implementation

dynamic getError(String errorCode, [List<String>? path]) {
  AbstractControl? control = this;
  if (path != null && path.isNotEmpty) {
    control = findPath(path);
  }
  if (control == null || control._errors == null) {
    return null;
  }
  return control._errors![errorCode];
}