Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3679580
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:28:34+00:00 2026-05-19T03:28:34+00:00

I have a simple form that uses jQuery validation to notify the user of

  • 0

I have a simple form that uses jQuery validation to notify the user of input errors, etc. When I add an ASP.NET CustomValidator to the form, it causes the page to postback and skip the jQuery validation. I need the form to not be submitted to the server until the client-validation is correct. Has anyone seen this before?

This is my form:

<form id="form1" runat="server">  
    <core:standardscriptmanager runat="server" />
    <div>
        <asp:textbox id="Email" name="Email" runat="server" cssclass="_RegisterFormValidate FormField Email {required:true, email:true, messages:{required:'You must enter an email address.', email:'Please enter a valid email address.'}}" maxlength="200" columns="75" width="98%" tooltip="Your email address"></asp:textbox>
        <br /><br />
        <core:recaptcha runat="server" />
        <br />
        <asp:linkbutton id="CreateAccount" runat="server" onclick="CreateAccount_Click" text="create"></asp:linkbutton>
    </div>
</form>

And this is the core:recaptcha control that contains the custom validator:

<script type="text/javascript"
 src="http://www.google.com/recaptcha/api/challenge?k=XXXKEY">
</script>
<noscript>
 <iframe src="http://www.google.com/recaptcha/api/noscript?k=XXXKEY"
     height="300" width="500" frameborder="0"></iframe><br>
 <textarea name="recaptcha_challenge_field" rows="3" cols="40">
 </textarea>
 <input type="hidden" name="recaptcha_response_field"
     value="manual_challenge">
</noscript>

<asp:customvalidator id="RecaptchaValidator" runat="server" controltovalidate="DummyInput" onservervalidate="ServerValidate" validateemptytext="true" />
<asp:textbox id="DummyInput" runat="server" cssclass="Hidden"></asp:textbox>

Note: The DummyInput is only there to make the CustomValidator happy, my ServerValidate event correctly deals with the captcha results.

The ServerValidate portion of the CustomValidator is working fine during the postback, but I need it to stop interfering with the client-side validation. If I remove the CustomValidator from the recaptcha control, everything plays nice.

Do I need to do something like call jquery-validate in the CustomValidator’s clientvalidationfunction in order to make this work correctly?

Any thoughts or suggestions would be welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:28:34+00:00Added an answer on May 19, 2026 at 3:28 am

    So it turns out the answer to this issue was to set CausesValidation=”False” on my linkbutton and then call Page.Validate() in the linkbutton’s OnClick handler.

    It’s not exactly the solution I was looking for since I’ll have to remember to do those things every time I want to use recaptcha (or any custom validator for that matter) but this seems to work for now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form with some plain html input like bellow using ASP.NET
I have a form that uses the excellent jQuery validation plugin. This is a
I have a simple .NET 2.0 windows form app that runs off of a
I have an ASP.Net MVC Page with a very simple form on it: One
I have to create a simple form that uses JSP for the view with
There are some HTML based games (ie bootleggers.us) that have a simple login form
I have a site that has a simple HTML button in a form. All
I'm writing a simple app that's going to have a tiny form sitting in
I have a simple form on a view page, implemented as a user control,
This is a common problem in ASP MVC. I have a simple search form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.