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 6559457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:19:47+00:00 2026-05-25T13:19:47+00:00

My question is more process based than code based, but to share (and maybe

  • 0

My question is more process based than code based, but to share (and maybe stumble upon some inconsistencies) I am using:

  • jQuery 1.6.2
  • jQuery Validations 1.8.1

So here goes…

When adding in a custom validation (using addMethod) that requires a call to the server (instead of the remote call built in), you must set to response to happen synchronously because the method will finish before the result returns from the server. Is this correct?

I’m also assuming the 2 main ways to do this are via calling an $.ajax request with async false, or deferred.promise(). Is this correct?

I’ve been looking thru many posts that ask questions related to custom validation using getJSON and the responses are usually “you’re not returning anything back” but doesn’t this miss the point – isn’t the response too late as well?

Thanks for any responses!

  • 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-25T13:19:47+00:00Added an answer on May 25, 2026 at 1:19 pm

    Your assumptions are correct. You cannot use asynchronous requests with custom methods because the jQuery validate needs to know that this is an async request. That’s why you should use the remote rule in this situation and not custom methods:

    $("#myform").validate({
        rules: {
            email: {
                required: true,
                email: true,
                remote: {
                    url: "check-email.php",
                    type: "post",
                    data: {
                        username: function() {
                            return $("#username").val();
                        }
                    }
                }
            }
        }
    });
    

    Synchronous AJAX requests (or SJAX) are not something that I would recommend you doing.

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

Sidebar

Related Questions

This question is more of an architecture based question. I would like some solutions
This is related to my previous question More than 1 Left joins in MSAccess
This is a code review question more then anything. I have the following problem:
This question is more UI/Design-ish than hard-core programming is. Background: I've been coding in
EDIT: This question is more about language engineering than C++ itself. I used C++
Not really a coding question more a little help with my idea of a
One more question about most elegant and simple implementation of element combinations in F#.
Really my question has more to do with the server-side scrubbing of html that's
UPDATED: Added one more question (Question #4). Hi all, I'm building myself a custom
(if the question is more appropriate for RackOverflow please let me know) I've setup

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.