Open dirkpostma opened 8 years ago
Yes, named forms should be the way to go, but it's really strange that errors are not shown. I'll check it out, thanks for reporting.
Errors come from response are just flat array. No mentions about form name :( But actually 'Validator' knows form name. Not sure if Laravel is able work with named forms correctly.
Try to use inline rules instead of $form->validate('min:3|max:255|required') to set the rules
ie:
use: ->add( 'title', 'text', [ 'rules' => 'min:3|max:255|required' ] )
I'd like to render multiple forms on a page, form A and form B. They both have a field named 'somefield' field, that has some validation rules. When I submit form A and validation failed, the error is shown in both form A and B. Of course, I only want this error to be displayed in form A.
I read about the option of named forms, http://kristijanhusak.github.io/laravel-form-builder/form/named-form.html, I guess that is meant exactly for my usecase. However, when I set a name on a form, either by passing 'name' as option or by setting the property $name in de form class, I don't see errors at all when validation fails.
Questions: