当我为 make a popover 调用验证时,我一直在实施Jasny Twitter Bootstrap ,并且它给了我一个关于未定义变量的错误。
我附上我的代码,以便您可以帮助我解决这个问题
$('#ReferalAdminAddForm').validate({
rules: {
'data[Referal][CustomerTypeId]': {
required: true
},
'data[Referal][town_id]': {
required: true
},
'data[Referal][nit]': {
required: true,
minlength: 11,
maxlength: 11,
digits: true
},
'data[Referal][name]': {
required: true,
minlength: 2,
maxlength: 128
},
'data[Referal][address]': {
required: true
},
'data[Referal][phone]':{
required:false,
minlength: 6,
maxlength: 16
}
},
highlight: function(element) {
$(element).closest('.control-group').removeClass('success').addClass('error').popover('toggle');
},
success: function(element) {
element
.text('OK!').addClass('valid')
.closest('.control-group').removeClass('error').addClass('success');
}
});
控制台给出这个消息
TypeError: b is undefined
.../2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.wi...
bootst....min.js (línea 7)
我的javascript调用是:
<script src="/ikarus/j_query/js/jquery.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-transition.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-alert.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-modal.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-dropdown.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-scrollspy.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-tab.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-tooltip.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-popover.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-button.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-collapse.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-typeahead.min.js"></script>
<script src="/ikarus/twitter_bootstrap/js/jasny/bootstrap-fileupload.min.js"></script>