dynamic getError(String errorCode, [ List<String> path ])

Source

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