errors method

String errors ()

Returns all errors in a text format. Errors are separated by delimiter (default is a space). IMPORTANT: Executing this method has the side-effect of also executing validate().


String errors() {
  var lst = validate();
  String result = lst.fold<String>('', (previous, element)  {
    return element.errorText != null ? '$previous ${element.errorText}' : null;
  if(result == null) return null;
  return result.trim();