private function _veriForm() { $validacion = new Validacion($this->_camposObligatorios); $validacion->validacionCampos(); $this->_camposPendientes = $validacion->getCamposPendientes(); $this->_camposErroneos = $validacion->getCamposErroneos(); if ($this->_camposPendientes or $this->_camposErroneos) { Vista::retornarVista($validacion); } else { return true; } }
private function _veriForm() { if (isset($_POST["usuario"]) && !empty($_POST["usuario"]) && isset($_POST["registrar"])) { $usuario = $_POST["usuario"]; $this->_duplicado($usuario); } $validacion = new Validacion($this->_camposObligatorios, $this->_duplicado); $validacion->validacionCampos(); $this->_camposPendientes = $validacion->getCamposPendientes(); $this->_camposErroneos = $validacion->getCamposErroneos(); // Si $this->_mensaje tiene contenido es que ha habido algún problema al verificar si existe el DNI y no debe visualizarse // de nuevo el formulario if ($this->_camposPendientes or $this->_camposErroneos or $this->_duplicado or $this->_mensaje) { Vista::retornarVista($validacion); } else { return true; } }