public function errors($format = 'array')
    {
        $errorMessage = '';
        $errors = Session::get('errors') ?: false;

        if (!$errors) {
            return false;
        }

        if ($format === 'string') {
            foreach ($errors as $error => $message) {
                $errorMessage .= $message.'<br>';
            }
        } else {
            $errorMessage = Session::get('errors');
        }

        return $errorMessage;
    }
public function errors($format = 'array')
    {
        $errorMessage = '';
        $errors = Session::get('errors') ?: false;

        if (!$errors) {
            return false;
        }

        if ($format === 'string') {
            foreach ($errors as $error => $message) {
                $errorMessage .= $message.'<br>';
            }
        } else {
            $errorMessage = Session::get('errors');
        }

        return $errorMessage;
    }
public function errors ( $ format = 'array' ) { $ errorMessage = '' ; $ errors = Session :: get ( 'errors' ) ? : false ; if ( ! $ errors ) { return false ; } if ( $ format === 'string' ) { foreach ( $ errors as $ error => $ message ) { $ errorMessage .= $ message . '<br>' ; } } else { $ errorMessage = Session :: get ( 'errors' ) ; } return $ errorMessage ; }
ValidationService Errors.

@param string $format Type of error request

@return mixed
ValidationService Errors .