Im not sure that this has anything to do with it... But why are you
extending the base class? Normal procedure is to extend the generated
form class.
Reynier Perez Mira wrote:
> Hi every:
> I created a Forms based on a Propel Model and using the propel:build-forms
> task. I try to personalize a little more the generated form adding some rules
> for validation. See the code below:
>
> class BaseAutoresForm extends BaseFormPropel
> {
> public function setup()
> {
> $this->setWidgets(array('nombre_autor' => new sfWidgetFormInput()));
> $this->setValidators(array('nombre_autor' => new
> sfValidatorString(array('required'=>true,'min_length'=>
> 4,'max_length'=>50))));
> $this->widgetSchema->setNameFormat('autores[%s]');
> $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
> parent::setup();
> }
>
> public function getModelName()
> {
> return 'Autores';
> }
> }
>
> So this code when I leave a blank field must be validate but it doesn't work
> because the form is always send. I try also writing only 3 characters (for
> min_lenght) and doesn't work too.
>
> What I'm doing wrong?
> Cheers and thanks in advance
> Ing. Reynier Pérez Mira
> Grupo de Soporte al Desarrollo - Dirección Técnica IP
>
>
> >
--
Ant Cunningham
Graphic Designer | Web Developer
Vector Based Design
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---