One precision: submitting one defect is not for Bernhard to do the job
but to keep track of the problem.
Cheers,
Victor

On May 16, 5:44 pm, Victor Berchet <[email protected]> wrote:
> My opinion on this is that:
> - the Choice validator does what it is expected to do (make sure the
> value belongs to a list of possible values),
> - the ChoiceList also does what it is expected to do.
>
> May be one solution could then be to add a new validator type ?
> @assert:ChoiceMap(mapping = {"m"="male", "f"="female"})
>
> On May 16, 3:51 pm, John Wards <[email protected]> wrote:
>
>
>
>
>
>
>
> > On Mon, May 16, 2011 at 2:24 PM, Victor Berchet
>
> > <[email protected]> wrote:
> > > The problem is that:
>
> > > @assert:Choice(choices = {"male", "female"}, message = "Choose a valid
> > > gender.")
>
> > > tells the validator that the value should be either "male" or
> > > "female",
> > > while the widget choices are array(0 => 'male', 1 => 'female'), "0"
> > > and "1" being the values and "male" and "female" the option labels.
>
> > > You should probably enter a defect in the system for that.
>
> > More than happy to fix it myself and add a pull, less work for Bernhard to 
> > do.
>
> > However what should I be changing, the validator or the form rendering.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" 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-devs?hl=en

Reply via email to