Bootstrap Validator:验证动态无线电

时间:2018-03-15 08:19:09

标签: javascript jquery html

我正在尝试动态输入验证

HTML:

<input type="radio" value="1"  class="job_knowledge" name="job_knowledge[0]" required>
<input type="radio" value="2"  class="job_knowledge" name="job_knowledge[0]" required>
<input type="radio" value="3"  class="job_knowledge" name="job_knowledge[0]" required>

//克隆字段

<input type="radio" value="1"  class="job_knowledge" name="job_knowledge[1]" required>
<input type="radio" value="2"  class="job_knowledge" name="job_knowledge[1]" required>
<input type="radio" value="3"  class="job_knowledge" name="job_knowledge[1]" required>

//克隆字段

<input type="radio" value="1"  class="job_knowledge" name="job_knowledge[2]" required>
<input type="radio" value="2"  class="job_knowledge" name="job_knowledge[2]" required>
<input type="radio" value="3"  class="job_knowledge" name="job_knowledge[2]" required>
当我尝试下载时,

无法验证:

JS BOOTSTRAP VALIDATOR

$('#evaluation_form').bootstrapValidator({
    feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            job_knowledge:{
                selector:'.job_knowledge',
                validators:{
                    notEmpty:{
                      message: "This field is required"
                    }
                }
              }
        }
    });

0 个答案:

没有答案