genemu/GenemuFormBundle — Issue #32: jQueryUIAutocomplete and Form validation
Author: artseld
Created: 2012-02-07 17:06:49+00:00
State: open

Hi, I think that I found a bug or I do something incorrectly ...
According instructions, I put into my form builder this code:
```php
->add('name', 'genemu_jqueryautocompleter', array(
'label' => '{LABEL}',
'route_name' => '{ROUTE}))
```
Form also uses `data_class` (Doctrine entity):
```php
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'App\MyBundle\Entity\{ENTITY_NAME}',
'validation_groups' => array( '{GROUP_NAME}' ),
) + $options;
}
```
Validators are in validation.xml file. For this property, as example, I added NotBlank validator.
`name` value is not bind when $form->bindRequest($request) is called. $form->isValid() returns FALSE. In $form->getData() `name` is NULL. But in request `form_name` and its value exists. Probably, it may be as result of `text` to `hidden` transformation in view and real and submitted field types are different.