src/Validation.php
private function formatErrorMessage(array $error) {
        if (isset($error['messageCode'])) {
            $messageCode = $error['messageCode'];
        } elseif (isset($error['message'])) {
            return $error['message'];
        } else {
            $messageCode = $error['error'];
        }

        // Massage the field name for better formatting.
        $msg = $this->formatMessage($messageCode, $error);
        return $msg;
    }
private function formatErrorMessage(array $error) {
        if (isset($error['messageCode'])) {
            $messageCode = $error['messageCode'];
        } elseif (isset($error['message'])) {
            return $error['message'];
        } else {
            $messageCode = $error['error'];
        }

        // Massage the field name for better formatting.
        $msg = $this->formatMessage($messageCode, $error);
        return $msg;
    }
private function formatErrorMessage ( array $ error ) { if ( isset ( $ error [ 'messageCode' ] ) ) { $ messageCode = $ error [ 'messageCode' ] ; } elseif ( isset ( $ error [ 'message' ] ) ) { return $ error [ 'message' ] ; } else { $ messageCode = $ error [ 'error' ] ; } // Massage the field name for better formatting. $ msg = $ this -> formatMessage ( $ messageCode , $ error ) ; return $ msg ; }
Get the error message for an error row.

@param array $error The error row.
@return string Returns a formatted/translated error message.
Get the error message for an error row .