hello, 

i have a big problem with forms in SF2.

In my user entity I have many properties that have @assert:NotBlank(), 

RegisterType :
public function buildForm(FormBuilder $builder, array $options)
    {
        $builder->add('email');
        $builder->add('pseudo');
        $builder->add('firstname');
        $builder->add('lastname');
        $builder->add('password', 'password');
        $builder->add('gender', 'choice', array('choices' => array('male' => 
'Male', 'female' => 'Female'),'expanded' =>true, 'multiple' =>false));
        $builder->add('cgu', 'checkbox');
    }

    public function getDefaultOptions(array $options)
    {
        return array(
            'data_class' => 'My\ModelBundle\Entity\User',
        );
    }

When i submit Form with *no empty fields *I have this error : this value 
should not be blank ( in global error of form )

and i have a ForgotPasswordType :


class ForgotPasswordType extends AbstractType
{ 
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder->add('email');
    }

    public function getDefaultOptions(array $options)
    {
        return array(
            'data_class' => 'My\ModelBundle\Entity\User',
        );
    }
}

when i submit that form i receive 7 error messages : this value should not 
be blank


every think was just fine, i did not modify anything in that form, i don't 
know what hapened !!

any ideas pleaaase 

thanks

-- 
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 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

Reply via email to