Example #1
0
 public function _validate($data)
 {
     if (!parent::_validate($data)) {
         return false;
     }
     if ($data['repassword'] != $data['password']) {
         $this->error[] = "Passwords are not same <br>";
         return false;
     }
     if ($data['agreement'] != 1) {
         $this->error[] = "You don't agree the regulation <br>";
         return false;
     }
     return true;
 }
Example #2
0
 public function validate()
 {
     $data = self::data_to_array();
     $rules = array('id_oferta' => array('label' => 'Id Oferta', 'type' => 'numeric', 'required' => true, 'min' => 1, 'max' => 9999999999.0, 'trim' => true), 'nombre' => array('label' => 'Nombre', 'type' => 'string', 'required' => true, 'min' => 5, 'max' => 255, 'trim' => true), 'email' => array('label' => 'E-Mail', 'type' => 'email', 'required' => true, 'min' => 5, 'max' => 255, 'trim' => true), 'telefono' => array('label' => 'Teléfono', 'type' => 'string', 'required' => true, 'min' => 5, 'max' => 255, 'trim' => true), 'tecnologias' => array('label' => 'Tecnologías', 'type' => 'string', 'required' => true, 'min' => 0, 'max' => 255, 'trim' => true), 'anios_experiencia' => array('label' => 'Años de Experiencia', 'type' => 'string', 'required' => true, 'min' => 1, 'max' => 255, 'trim' => true), 'disponibilidad' => array('label' => 'Disponibilidad', 'type' => 'string', 'required' => true, 'min' => 1, 'max' => 255, 'trim' => true), 'renta_liquida' => array('label' => 'Renta Líquida', 'type' => 'numeric', 'required' => true, 'min' => 0, 'max' => 9999999999.0, 'trim' => true), 'ext_curriculum' => array('label' => 'Curriculum', 'type' => 'string', 'required' => false, 'min' => 1, 'max' => 4, 'trim' => true), 'observaciones' => array('label' => 'Observaciones', 'type' => 'string', 'required' => false, 'min' => 1, 'max' => 5000, 'trim' => true));
     return parent::_validate($data, $rules);
 }