0
我想知道BootstrapValidator http://bootstrapvalidator.com/是否有typeahead验证。BootstrapValidator for bootstrap typeahead
我有一个窗体,我在哪里验证我的领域使用验证。其中一个字段是一个inout字段,其中附加了typeahead,所以输入字段由typeahead选择填充。
但是,无论何时我开始在输入字段中键入验证器验证其真实。我想像它一样,必须在typeahead选择之后进行验证,而不是在输入字段中写入。
$(document).ready(function() {
var options = {};
options.common = {
minChar: 1
};
options.ui = {
showVerdictsInsideProgressBar : true,
viewports : {
progress : ".pwstrength_viewport_progress"
}
};
.......
$('#user_country').on('input', function() {
$(this).parent().find('.small').hide();
});
$('#user_reg_form').bootstrapValidator({
excluded: ':disabled',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
........
country: {
validators: {
notEmpty: {
message: 'city is required'
}
}
},
}
})
我的预输入看起来像
$(ele).typeahead({
select:function(){
// here i do the select.....
}
});