Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Google reCaptcha验证错误_Javascript_Jquery_Html_Forms_Validation - Fatal编程技术网

Javascript Google reCaptcha验证错误

Javascript Google reCaptcha验证错误,javascript,jquery,html,forms,validation,Javascript,Jquery,Html,Forms,Validation,我对Jquery验证和google reCaptcha有问题,我有HTML网站和表单,我包括了Jquery验证(,我对验证字段没有问题,但我也想验证google reCaptcha,如果它是空的或不是空的 所以,我需要在validaiton规则中添加的唯一要求是检查recaptcha是否为空。我尝试了与输入字段相同的方法,但无效,所以我发现了一个伟大的toturial如何包含验证- 但仍然不起作用。这是我使用的代码,但它不起作用,它不验证Recpatca EverythSign。其他一切都可以正

我对Jquery验证和google reCaptcha有问题,我有HTML网站和表单,我包括了Jquery验证(,我对验证字段没有问题,但我也想验证google reCaptcha,如果它是空的或不是空的

所以,我需要在validaiton规则中添加的唯一要求是检查recaptcha是否为空。我尝试了与输入字段相同的方法,但无效,所以我发现了一个伟大的toturial如何包含验证-

但仍然不起作用。这是我使用的代码,但它不起作用,它不验证Recpatca EverythSign。其他一切都可以正常工作。没有验证,Recpatha正常工作,但我想将其包括在validation notw中

为recaptcha插入div的HTML代码:

   <input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
                <div class="g-recaptcha" data-sitekey="6LcRxx8TAAAAACq0p7qA2H2519UNqtw5mtw-k_qB"></div>
在JS消息下:

 hiddenRecaptcha: "Your Captcha response was empty. Please try again."
这是一个有点愚蠢的问题,但我不知道问题在哪里,我是否忘记了为验证此部件添加一些额外的内容


谢谢您的帮助。

您是否告诉jQuery validate不要忽略隐藏字段(根据您链接到的教程)?您是否告诉jQuery validate不要忽略隐藏字段(根据您链接到的教程)?
 hiddenRecaptcha: "Your Captcha response was empty. Please try again."