Does anybody know a good way to completely customize validation
output? I've tried a number of options but can only get partway there.
For example I'd like to style not only the affected form input but
also its label, and provide a message (common to many apps). This has
been problematic, as the input is referenced internally by 'html_tag'
and at that point its associated label is out of scope:
I've added the message using this method but can't get at the label.
I've also created an auto-labeling form builder (http://
builders) but the error handling still only grabs the input itself
after the form has been built (i.e., it doesn't view my custom labeled
input as a sort of composite control).
I can accomplish this in the view conditionally by checking
@instance.errors on a per-field basis, but this seems clunky. And if I
do that, doesn't all the validation stuff still fire internally,
burning cycles on something I don't use?
There must be a good way to automate this.