public static function validationErrorsToString($messages)
    {
        if ($messages instanceof MessageBag) {
            $messages = $messages->getMessages();
        }

        $errorString = '';

        if (is_array($messages)) {
            foreach ($messages as $field => $errors) {
                foreach ($errors as $error) {
                    $errorString .= ' ' . $error;
                }
            }
        }

        return $errorString;
    }
public static function validationErrorsToString($messages)
    {
        if ($messages instanceof MessageBag) {
            $messages = $messages->getMessages();
        }

        $errorString = '';

        if (is_array($messages)) {
            foreach ($messages as $field => $errors) {
                foreach ($errors as $error) {
                    $errorString .= ' ' . $error;
                }
            }
        }

        return $errorString;
    }
public static function validationErrorsToString ( $ messages ) { if ( $ messages instanceof MessageBag ) { $ messages = $ messages -> getMessages ( ) ; } $ errorString = '' ; if ( is_array ( $ messages ) ) { foreach ( $ messages as $ field => $ errors ) { foreach ( $ errors as $ error ) { $ errorString .= ' ' . $ error ; } } } return $ errorString ; }
Converts validation errors to plain string.

@param $messages

@return string
Converts validation errors to plain string .