src/Validation.php
private function formatErrorList(string $field, array $errors) {
        if (empty($field)) {
            $fieldName = '';
            $colon = '%s%s';
            $sep = "\n";
        } else {
            $fieldName = $this->formatFieldName($field);
            $colon = $this->translate('%s: %s');
            $sep = "\n  ";
            if (count($errors) > 1) {
                $colon = rtrim(sprintf($colon, '%s', "")).$sep.'%s';
            }
        }

        $messages = $this->errorMessages($field, $errors);
        $result = sprintf($colon, $fieldName, implode($sep, $messages));
        return $result;
    }
private function formatErrorList(string $field, array $errors) {
        if (empty($field)) {
            $fieldName = '';
            $colon = '%s%s';
            $sep = "\n";
        } else {
            $fieldName = $this->formatFieldName($field);
            $colon = $this->translate('%s: %s');
            $sep = "\n  ";
            if (count($errors) > 1) {
                $colon = rtrim(sprintf($colon, '%s', "")).$sep.'%s';
            }
        }

        $messages = $this->errorMessages($field, $errors);
        $result = sprintf($colon, $fieldName, implode($sep, $messages));
        return $result;
    }
private function formatErrorList ( string $ field , array $ errors ) { if ( empty ( $ field ) ) { $ fieldName = '' ; $ colon = '%s%s' ; $ sep = "\n" ; } else { $ fieldName = $ this -> formatFieldName ( $ field ) ; $ colon = $ this -> translate ( '%s: %s' ) ; $ sep = "\n  " ; if ( count ( $ errors ) > 1 ) { $ colon = rtrim ( sprintf ( $ colon , '%s' , "" ) ) . $ sep . '%s' ; } } $ messages = $ this -> errorMessages ( $ field , $ errors ) ; $ result = sprintf ( $ colon , $ fieldName , implode ( $ sep , $ messages ) ) ; return $ result ; }
Format a field's errors.

@param string $field The field name.
@param array $errors The field's errors.
@return string Returns the error messages, translated and formatted.
Format a field s errors .