src/DataObject.php
public function getErrorsAsString(string $separator='<br />'): string
  {
    $errors = $this->errors;
    
    foreach($errors as &$error){
      $error = $error->getMessage();
    }
    
    return implode($separator, $errors);
  }
public function getErrorsAsString(string $separator='<br />'): string
  {
    $errors = $this->errors;
    
    foreach($errors as &$error){
      $error = $error->getMessage();
    }
    
    return implode($separator, $errors);
  }
public function getErrorsAsString ( string $ separator = '<br />' ) : string { $ errors = $ this -> errors ; foreach ( $ errors as & $ error ) { $ error = $ error -> getMessage ( ) ; } return implode ( $ separator , $ errors ) ; }
Return all errors, if any, as a unique string

@param  string  $separator  The separator
@return string  String containing all the errors separated by the specified sequence
Return all errors if any as a unique string