I\'m using the excellent jquery.validation plugin by Jörn Zaefferer and I was wondering whether there\'s a easy way to automatically trim form elements before they are valid
I did this with success.
Instead of:
Email: { required: true, email: true }
I did this:
Email: { required: { depends:function(){ $(this).val($.trim($(this).val())); return true; } }, email: true }