Nested error label wrapping with the validate plugin

Nested error label wrapping with the validate plugin

I am using the jQuery validate plugin . My error labels are styled like tooltips and take many levels of nested divs in order to create. The plugin has a wrapper option that allows for an element type to be specified as a wrapper for the error label, but it's only wrapped once.

Is anyone familiar with how to do nested wrapping?

Mine is more complex, but for example:

  1. <div class="tooltip">
  2.         <div>
  3.                 <div></div>
  4.                 <div>
  5.                         <span class="error">error message</span>
  6.                 </div>
  7.                 <div></div>
  8.         </div>
  9. </div>