Last active
November 16, 2016 10:13
-
-
Save hemraj7171/2b5319f576cc596c60239af2acbb0a5e to your computer and use it in GitHub Desktop.
Validate Google Capcha before form submit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("form").submit(function(event) { | |
var recaptcha = $("#g-recaptcha-response").val(); | |
if (recaptcha === "") { | |
event.preventDefault(); | |
alert("Please check the recaptcha"); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment