A discussion about validation and rules for Groups
I am contemplating an Iterator/Generator based solution for group validation:
Actually, it is quite easy with the API we have for Containers.
$g = $form->addGroup('name')->setLabel('Name:'); $g->addText('first')->setLabel('Firstname'); $g->addText('last')->setLabel('Lastname');
We have $attributes as second parameter for Container constructor, but it look a bit useless for common groups (although it can be useful for custom > elements like hierselects etc). Do we keep it or skip it ?
Default renderer currently substitutes the {attributes} placeholder in group's template. May be useful for e.g. styling the <div> around grouped elements. — Alexey Borzov 2009/10/01 21:41
There is an issue with separator between elements. It's handy to be able to set it in the group itself, but it could also be set in the renderer.