I use parsleyjs.org to validate my forms.
The plugin creates ui.parsley-errors-list when the input has a validation error.
The problem is that .parsley-errors-list is placed immediately after the form element "input, textarea, radio, etc.", breaking my layout as follows:

<fieldset> <p>Checkboxs with a max</p> <label class="checkbox parsley-error"> <input name="checkbox2" type="checkbox" required="" data-parsley-maxcheck="2" data-parsley-multiple="checkbox2" data-parsley-id="5492"> <span></span> <p>Normal</p> </label> <ul class="parsley-errors-list filled" id="parsley-id-multiple-checkbox2"> <li class="parsley-required">This value is required.</li> </ul> <label class="checkbox"> <input name="checkbox2" type="checkbox" data-parsley-multiple="checkbox2" data-parsley-id="5492"> <span></span> <p>Normal</p> </label> <label class="checkbox"> <input name="checkbox2" type="checkbox" data-parsley-multiple="checkbox2" data-parsley-id="5492"> <span></span> <p>Normal</p> </label> </fieldset>
Instead, .parsley-errors-list should be placed as the last child in the <fieldset> container.
Is this achievable?
Leo
source share