DBookatay Posted May 2, 2013 Share Posted May 2, 2013 I'm using jQuery validation to make sure all my required fields are filled in, however I was getting a lot of bot spam and want to use something like jQuery Real Person as a captcha system . How do I combine the 2, so that submit will fail if the captcha field is not correct? $("#enroll").validate({ invalidHandler: function(e, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? 'You missed 1 required field.' : 'You missed ' + errors + ' required fields'; $("div.Error span").html(message); $("div.Error").show(); } else { $("div.Error").hide(); } }, }); The link, if relevant is here Quote Link to comment https://forums.phpfreaks.com/topic/277525-combining-jquery-validate-and-jquery-real-person/ Share on other sites More sharing options...
Mahngiel Posted May 2, 2013 Share Posted May 2, 2013 How do I combine the 2, so that submit will fail if the captcha field is not correct? "The entered value is compared on the server with the generated value..." Use AJAX or post processing. Further, I hope you're not relying on JS only for validation. Quote Link to comment https://forums.phpfreaks.com/topic/277525-combining-jquery-validate-and-jquery-real-person/#findComment-1427793 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.