javascript - jQuery validation message issue -
i have 3 input radio buttons like
<input type="radio" name="specific_parent" id="parent_one" class="radio" value="existing_parent"><label class="redio_label" for="existing_parent">existing parent</label> <input type="radio" name="specific_parent" id="parent_two" class="radio" value="prospective_parent"><label class="redio_label" for="prospective_parent">prospective parent</label> <input type="radio" name="specific_parent" id="parent_third" class="radio" value="other"><label class="redio_label" for="other">other</label>
i have applied jquery validation this:
rules: { specific_parent: { required: true } }, messages: { specific_parent: { required: 'please select radio button' } }
problem display error message after first input radio button , layout break.
use errorplacement
errorplacement: function (error, element) { error.insertbefore(element); }