This is indeed a bug, in this case something never tested for.

Is using required: function() {} together with remote an option?

Jörn

On Fri, Apr 17, 2009 at 3:03 PM, snobo <g...@riga.ahlers.com> wrote:
>
> I've been trying to use remote method coupled with depends, like this:
>
> remote: {
>        depends: function(element) { element.value = $.trim(element.value);
> return element.defaultValue != element.value; },
>        url: 'my.php',
>        type: 'post',
>        data: { action: 'check_user_name' }
> }
>
> and this doesn't work, because the whole remote parameter array gets
> overwritten with the result of evaluating my 'depends' function (so
> instead of array it becomes a scalar, true or false). Therefore in
> case of false the AJAX call doesn't happen, and in case of true an
> error occurs (because there's no url, no type, and no data anymore).
>
> I assume remote and depends are incompatible, is it correct? If yes,
> is there a workaround for this?
>
> TIA
> cheers

Reply via email to