dockyard/client_side_validations-simple_form — pull request #8 by danryan (2012-10-09 00:08:04+00:00)
Title: 2 0 stable

This addresses issues #6 and #3.

I'm testing client_side_validations-simple_form on the 2-0-stable branch with client_side_validations on the 3-2-stable branch, using the default simple_form generators with zero modifications. Everything works great for the most part, except the `error_class` is placed on the wrong element. Since the bootstrap wrapper adds an additional wrapper surrounding the validated input, `wrapper_tag` and `wrapper_class` no longer match the same element.

This pull request removes the assumption that `wrapper_class` and `wrapper_tag` will always match the same element. The default simple_form wrapper continues to work as intended, as the matched element is the same.

This is what it currently looks like:

!(before change)[http://i.imgur.com/zryNX.png]

This is what it looks like with this change incorporated:

!(after change)[http://i.imgur.com/h8Jns.png]

It also correctly formats errors on forms tagged with the `form-horizontal` class:

!(horizontal forms)[http://i.imgur.com/DtYYQ.png]