$valcarnet->setMin(4); $valcarnet->setMax(10); $unity = $_REQUEST['id_unity']; $valunity = new ValidatorInteger('Unidad', $unity, false); $valunity->setMin(2); $extention = $_REQUEST['id_extention']; $valextention = new ValidatorInteger('Extension', $extention, false); $valextention->setMin(2); $career = $_REQUEST['id_career']; $valcareer = new ValidatorInteger('Carrera', $career, false); $valcareer->setMin(2); $captcha = $_REQUEST['id_captcha']; $hidcapcha = $_REQUEST['id_hid_captcha']; $valcaptcha = new ValidatorCaptcha('Captcha', $captcha, $hidcapcha, true); if ($valmail->verify() and $valpassword->verify($passcomp) and $valid->verify() and $valname->verify() and $valsurname->verify() and $valaddress->verify() and $valgender->verify() and $valschool->verify() and $valbirthdate->verify() and $valcarnet->verify() and $valphone->verify() and $valcelular->verify() and $valunity->verify() and $valextention->verify() and $valcareer->verify() and $valcaptcha->verify()) { $objcontroller = new ControlUser($valmail->getField(), $valpassword->getField(), $valid->getField(), $valname->getField(), $valsurname->getField(), $valaddress->getField(), $valgender->getField(), $valschool->getField(), $valbirthdate->getField(), $valphone->getField(), $valcelular->getField(), $valcarnet->getField(), $valunity->getField(), $valextention->getField(), $valcareer->getField(), 1, null); $objcontroller->registerStudent(); } else { echo json_encode(array('uno' => $valmail->getMessage(), 'dos' => $valpassword->getMessage(), 'tres' => $valid->getMessage())); } } else { if ($service == 2) { $mail = $_REQUEST['id_mailrecov']; $valmail = new ValidatorMail('Correo', $mail, true); $captcha = $_REQUEST['id_captcharecov']; $hidcapcha = $_REQUEST['id_hid_captcharecov']; $valcaptcha = new ValidatorCaptcha('CaptchaRecov', $captcha, $hidcapcha, true); if ($valmail->verify() and $valcaptcha->verify()) { $objcontroller = new ControlUser($valmail->getField(), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); $objcontroller->recover(); } else {