public function getErrorsAsString()
    {
        $string = '';
        foreach ($this->getErrors() as $error) {
            $string .= sprintf(
                "%s: %s",
                $error['field'],
                $error['message']
            );
            if (isset($error['rejected'])) {
                $string .= sprintf(" ('%s' given)", $error['rejected']);
            }
            $string .= ";\n";
        }

        return trim($string);
    }
public function getErrorsAsString()
    {
        $string = '';
        foreach ($this->getErrors() as $error) {
            $string .= sprintf(
                "%s: %s",
                $error['field'],
                $error['message']
            );
            if (isset($error['rejected'])) {
                $string .= sprintf(" ('%s' given)", $error['rejected']);
            }
            $string .= ";\n";
        }

        return trim($string);
    }
public function getErrorsAsString ( ) { $ string = '' ; foreach ( $ this -> getErrors ( ) as $ error ) { $ string .= sprintf ( "%s: %s" , $ error [ 'field' ] , $ error [ 'message' ] ) ; if ( isset ( $ error [ 'rejected' ] ) ) { $ string .= sprintf ( " ('%s' given)" , $ error [ 'rejected' ] ) ; } $ string .= ";\n" ; } return trim ( $ string ) ; }
Errors in string form
@return string
Errors in string form