In my form I have textbox , radio buttons and checkbox's which is mandatory .
I'm using the class "validate[required]"
.
The problem is, when I focus to a textbox the checkbox validation message appears as "This field is required" . anyone have idea?
<div class="form-group">
<label class=" col-sm-2 col-md-2 col-lg-2" for="textbox1" accesskey="Z">Textbox1</label>
<div class="col-sm-4 col-md-4 col-lg-4">
<span class="block input-icon input-icon-right">
<input type="text" class="validate[custom[textbox1]] form-control" id="textbox1"name="textbox1" value="@ViewBag.textbox1" >
<i class=""></i></span>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6 form-group">
<label class="col-sm-4 col-md-4 col-lg-4">customfield1 <span class="required astrixred">*</span></label>
<div class="col-sm-8 col-md-8 col-lg-8 leftpadding">
<input class="validate[required] ace ace-checkbox-2" type="CheckBox" name="customfield1" value="1" id="customfield1" data-prompt-position="bottomRight:20,0"><span class="lbl">chk 1</span>
<input class="validate[required] ace ace-checkbox-2" type="CheckBox" name="customfield1" value="2" id="customfield12" data-prompt-position="bottomRight:20,0"><span class="lbl">chk 2</span>
</div>
</div>
$("#register").validationEngine({ ischeckoneverytime: true, idOfSubmitButton: '#Save'});
finally I got the thing .I have checkbox's with same name and different id's. I just changed the id's of both two same and now it works as normal.. I don't know whats wrong. if anyone knows why it happens means please mention .. may be helps to someone :)