boekkooi/JqueryValidationBundle

normalize group for null value

Closed this issue · 3 comments

Form with submit btn doesn't work properly:

Warning: array_filter() expects parameter 1 to be array, null given in [FormRuleContext.php#L29](https://github.com/boekkooi/JqueryValidationBundle/blob/726f34e7c4cef101bf5b6b998346b342b45c42ed/src/Form/FormRuleContext.php#L29)
$builder->add('submit', 'submit');

I think the default value for group should be array and not null normalizeGroups

Hi @aitboudad

I'm unable to reproduce this error would it be possible to provide me with a example form + model? Also what symfony version are you using?

Thanks for reporting!

@boekkooi here is an example to reproduce the issue:

    public function issues18Action(Request $request)
    {
        $form = $this->get('form.factory')->createNamedBuilder('')
            ->add('submit', 'submit')
            ->getForm();
        $this->handleForm($request, $form);

        return $this->render('::form.html.twig', array('form' => $form->createView()));
    }

Thanks for the very quick response this should be fixed now