Hi,

I'd really like writing somthing like:

foreach ($form as $name=>$field) {
  if ($field->hasErrors())
    $field->setAttribute("attr", array("class" => "error"));
}

But I can't because setAttribute is not implemented in the *
Symfony\Component\Form\Form* class (and $attributes is private).

   1. Why there is no such setter since this can be useful if we know what 
   we are doing ?
   2. If this issue involve design concerns explaining why there is no 
   setter, how can I do what I want ? (i.e setting "error" class on field that 
   has errors)


Regards

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