$(function(){
$('#nn').bind('focus',function(){
$(this).data('validatebox').validating = false;
}).bind('blur',function(){
$(this).validatebox('validate');
});
});
Hi sir, the above code seem not working correctly without putting "required" property. And here is what i messed up so far and hope u don't mind:
$.extend($.fn.validatebox.defaults.rules, {
check: {
validator: function(value,param){
var obj = $(param[0]).combobox('getData');
var arr = [];
arr = $.map(obj,function(n,i){
var n = n.name1 || n.name2 ;
return n;
});
var result = jQuery.inArray(value, arr);
if(result == -1) return false;
else return true;
},
message: 'Incorrect!'
}
});