public function defaultAction() { if (helpers\Input::exists() && helpers\Token::check(helpers\Input::get('token'))) { $valid = helpers\Validation::check(array('username' => array('required' => true, 'name' => 'Username'), 'password' => array('required' => true, 'name' => 'Password'))); if (empty($valid->errors())) { } else { foreach ($valid->errors() as $error) { } } } }