With the 1.5 release you will be able to use this instead:

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

In other words, you can override all settings that $.ajax supports by
replacing the current remote: "url" with remote: {url:"url"} and add
whatever you need.

You can try it out now
(http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
for the next release.

Feedback is welcome!

Jörn

On Thu, Nov 20, 2008 at 8:28 PM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> The current workaround I recommend is to use ajaxSend:
>
> $().ajaxSend(function(e, xml, settings) {
>  $.extend(settings.data, { field2: $("#field2").val() });
> });
>
> With the drawback that it gets applied to all ajax requests. Depends
> on your application if thats a problem and how to avoid it.
>
> Jörn
>
> On Thu, Nov 20, 2008 at 5:17 PM, SMaDeP <[EMAIL PROTECTED]> wrote:
>>
>> I want to make a duplicate check with remote validation, but I need an
>> additional parameter like the parent key
>> (no duplicate article numbers within one order)!
>>
>> does addMethod support async validation?
>> can I add an additional parameter to the remote-url? How?
>>
>> Thanks in advance,
>>
>> Stefan
>>
>>
>

Reply via email to