Hi,
I'm trying to valídate the data inserted in a form. For that reason I created a 
file called AdicionarLicencias.yml inside the /validate folder in my module. 
This is the content of the file:

/valídate/AdicionarLicencias.yml
fillin:
  enabled: true
fields: 
  nombre:
    required: 
      msg: El campo Nombre no se puede dejar vacío
    sfStringValidator:
      min: 3
      min_error: El campo Nombre no puede tener menos de 5 carácteres
      max: 150
      max_error: El campo Nombre no puede tener más de 150 carácteres
  dvd:
    required: 
      msg: El campo DVD no se puede dejar vacio
    sfNumberValidator:
      type: float
  fecha_adq:
    required: 
      msg: El campo Fecha de Adquisición no se puede dejar vacio
  fecha_ven:
    required: 
      msg: El campo Fecha de Vencimiento no se puede dejar vacio
  sitio:
    sfUrlValidator:
      msg: Dirección no valida

Then in my class I have a method called AdicionarLicencias() with this code:
public function executeAdicionarLicencias()
{
        if ($this->getRequest()->getMethod() != sfRequest::POST) {
                // Some irrelevant operations, for this enviroment, to 
retrieval data from DB
                return sfView::SUCCESS;
        } else {
                // Insert the data and redirect to @listar_licencias 
                $this->redirect('@listar_licencias');
        }
}

And I have also the function for handle the Error:
public function handleErrorAdicionarLicencias()
{
        // Some irrelevant operations, for this enviroment, to retrieval data 
from DB - This are the same as the AdicionarLicencias method before POST 
        return sfView::SUCCESS;
}

Al lis good now. If I send the form ,with caused errors, I mean fields empty or 
others cases, to test if validation Works I get this error:

[sfRenderException]
The template "/_MainMenu.php" does not exist in:
stack trace

    * at ()
      in SF_SYMFONY_LIB_DIR/view/sfView.class.php line 463 ...
             460.     if (!is_readable($template))
             461.     {
             462.       // the template isn't readable
             463.       throw new sfRenderException(sprintf('The template "%s" 
does not exist in: %s', $template, $this->directory));
             464.     }
             465.
             466.     // check to see if this is a decorator template

....

¿Can any tell me or give me any idea why Symfony call __MainMenu.php partial 
when this belong to another module and haven't any relationship with this one?
Cheers and thanks in advance
Ing. Reynier Pérez Mira
Grupo Soporte al Desarrollo - Dirección Técnica IP



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to