Please override the 'enter' handler to custom your tag logic.
$('#tb').tagbox({
keyHandler: $.extend({}, $.fn.tagbox.defaults.keyHandler, {
enter: function(e){
var t = $(this);
var v = $.trim($(this).tagbox('getText'));
if (v !== '' && v.length<6){
var values = $(this).tagbox('getValues');
values.push(v);
$(this).tagbox('setValues', values);
}
}
})
})