public function process_post($post) { $post = new Validation($post); $post->add_rules('form', 'required'); if ($post->validate()) { switch ($post->form) { case 'update_translation': $post->add_rules('id', 'numeric'); if ($post->validate()) { Message_Model::update_translation($post->id, $post->translation); } break; } } else { echo 'FAILED VALIDATION'; } }