hey folks,
I'm looking to incorporate the jQuery.validation plugin into a project I'm working on and wondering if anyone knows of a way to display the error messages using BeautyTips.
Somthing along the lines of this:
$("#myForm" ).validate({
onfocusout: false,
onkeyup: false,
showErrors: function(errorMap, errorList) {
if (errorList.length > 0) {
// Tooltip
$('#erroneousElement [title]').bt({
hoverIntentOpts: {interval: 0,timeout: 0},
offsetParent: 'body',
positions: ['top','right','left','bottom'],
shrinkToFit: true,
padding: 7,
spikeLength: 20,
spikeGirth: 10,
cornerRadius: 6,
strokeWidth: 0,
strokeStyle: '#000',
fill: 'rgba(000,000,000,.5)',
cssStyles: {color: '#FFF', fontWeight: 'bold'},
showTip: function(box){
$(box).show();
},
hideTip: function(box, callback){
$(box).animate({opacity: 0}, 0, callback);
}
});
}
},
rules: {
email: { email:true },
phone: { digits:true }
},
messages: {
email: { email: 'please enter a valid email' },
phone: { digits: 'please enter a valid phone' }
}
});