有没有人使用bootstrap组合框实现了jquery bootsrap验证器?我一直在尝试更新我之前存在的jquery验证器脚本,但遗憾的是不成功。
有可能吗?
这是我的代码:
<script type="text/javascript" src="//oss.maxcdn.com/jquery.bootstrapvalidator/0.5.3/js/bootstrapValidator.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/css/bootstrap-select.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/js/bootstrap-select.min.js"> </script>
<script type="text/javascript">
$(document).ready(function() {
$('.combobox').combobox();
$('#addprofile').bootstrapValidator({
container: 'tooltip',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
species: {
validators: {
notEmpty: {
message: 'Field species cannot be empty.'
}
}
});
});
</script>
<div class="form-group">
<label for="species">choose a specie (english only)</label>
<select class="combobox form-control" id="species" name="species"><option value="" selected="selected">type a specie</option><option value="1">Name</option>
</select>
</div>