Kentico reCaptcha does not block form submission

我的梦境 提交于 2019-12-11 19:33:25

问题


I have the reCaptcha FormControl in my WebPart

<script src='https://www.google.com/recaptcha/api.js'></script>
......

    <div class="form-group">
        <label>Please type the word below. If required use the buttons to change or listen to the word.</label>
        <cms:RecaptchaControl ID="reCaptchaVld" runat="server" data-theme="clean" data-callback="cpCallBack();" PrivateKey="xxxxxxxxx" PublicKey="xxxxxxxxx" data-recaptcha="" CssClass="g-recaptcha" /> 
    </div>

I did a test that I filled all required field but leave the reCaptcha blank or unchecked, clicked Submit button and the form was submitted successfully.

Did I miss something?


回答1:


If it is your custom webpart, you need to call the IsValid() method to check whether the text was correctly entered.



来源:https://stackoverflow.com/questions/30203959/kentico-recaptcha-does-not-block-form-submission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!