Thanks :)
Gábor Fási a écrit :
> Quote from its description: "The sfValidatorPropelChoice validator
> validates that the tainted value is among the list of records of a
> given Propel model" so you cannot use it like you wanted to.
> You'll need to use sfValidatorChoice.
> Also, I recommend you create enums like this:
> http://snippets.symfony-project.org/snippet/107
> This method will work on non-mysql db servers too.
>
> On Mon, May 18, 2009 at 12:49, Ahmed <ghaliano2...@gmail.com> wrote:
> >
> > Hi all;
> > I have an enum column with two choice, i write it in my yml schema
> > like this :
> > news:
> > type: { type: varchar, sqltype:enum, size: "'request','offer'",
> > default: request, required: true, notnull: true }
> > the column is correctly generated this is part off my
> > baseNewsForm.class.php :
> >
> > public function setup()
> > {
> > $this->setWidgets(array(
> > .......,
> > 'type' => new sfWidgetFormInputHidden(),
> > .......
> > ));
> >
> > $this->setValidators(array(
> > .......,
> > 'type' => new sfValidatorPropelChoice(array('model'
> > => 'News', 'column' => 'type', 'required' => false))
> > .......,
> > ));
> > }
> >
> > but when i try to save my news form i have always this form error :
> > (type is invalide)
> > Thanks
> > >
> >
--~--~---------~--~----~------------~-------~--~----~
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
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---