I have an ArticelPattern class which has $extraPatterns property. This property is an array of ExtraPattern (class) elements.
There is a custom constraint on the cla
Belongs to similar problem: use firstName
in your entities and forms. Not first_name
.
If your entity (User) has field like firstName
, form builder accepts form_field
(with underscore) field naming. It saves data correctly and so on. But if you would add some custom constraint to this field, be careful with underscore: don't use it. Use camelCaseFieldNames
insted or you'll get errors attached to form, not to field.
You class constraint is probably being mapped to a form of form
type, which has error_bubbling
enabled by default. Setting this option to false
should do what you're looking for.
$builder ->add('extraPatterns', 'collection', array(
// ...
'options' => array('error_bubbling' => false),
));