Anahkiasen/former — pull request #162 by petercoles (2013-07-09 22:22:27+00:00)
Title: Control over which validations errors contribute to styling for Groups

Addresses issues raised for #42.

The opening tag for a manually-initiated group is generated before Former knows what the contents of that group will be, and whether they have any associated validation errors. The current behaviour - doing what it did for the last field of the last group isn't very satisfactory.

This pull request allows the developer inserting the group by hand, to specify what fields should be tested against when determining whether to apply error styling.

This isn't the same as specifying what fields will be in the group. When fields are grouped they may be validated together to reflect interactions between them. This change allows the results of validation against all, some or none of the fields to be used to determine whether to apply error styling to the group.