Validation error variable is protected
Permalink
This is my output when trying to display the error in my single_page:
Im using this code to set the value:
I can't display the error if it is protected. Is there anyway to unprotect it so that I can display it?
ValidationErrorHelper Object ( [error:protected] => Array ( [0] => Invalid email address provided. ) )
Im using this code to set the value:
public function on_start() { $this->error = Loader::helper('validation/error'); } public function on_before_render() { if ($this->error->has()) { $this->set('error', $this->error); } } public function check_email() { $email = $this->post('uEmail'); $vals = Loader::helper('validation/strings'); $valc = Loader::helper('concrete/validation'); if (!$vals->email($email)) { $this->error->add(t('Invalid email address provided.')); }
Viewing 15 lines of 16 lines. View entire code block.
I can't display the error if it is protected. Is there anyway to unprotect it so that I can display it?