validator-demo
validator-demo copied to clipboard
Selector
Can you add the original selector value? I want to do this:
$('input[type="email"]').mailgun_validator({
api_key: 'pubkey-XXXXXXXXXX',
in_progress: function(){
console.log('MG Validating');
},
success: function(data){
if (!data.is_valid) {
mailgunError($(this).selector, data);
} else {
mailgunSuccess($(this), data);
}
},
error: function(){
}
});
Take a look at my overhaul fork of this jquery plugin. It passes the original event object to the callbacks: https://github.com/msigley/validator-demo Using the event object you should be able to do this using the target property of the event.