May be a dumb suggestion, but can't you set the value as empty when
there is no value?
On Dec 6, 7:53 pm, david michaelg...@gmail.com wrote:
Hi all,
I want to make a remote validation on an empty field. Sometimes the
field may be empty and sometimes not. This depends on the selection of
Sorry forgot the code:
$(#field).rules(add, {
remote: {
url:test.asp,
type: post,
data: {fieldvalue: function(){
if ($(#field).val() == )
return empty;
else
return $(#field).val();
}
Not easy to solve - you could use $().ajaxStop() to wait for the
request to finish, then you valid() again, this time it will validate
the cached value and return the correct result.
Jörn
On Wed, May 6, 2009 at 8:00 AM, Mekilioz mekil...@gmail.com wrote:
I'm trying to do a jquery remote
Thanks for your reply.
This is what I have.
function validateName(button) {
txtName.rules('add', {
remote: {
url: 'validate.ashx'
, data: ({id: txtName.attr('name')})
}
}
, messages: {
remote: '* Error'
}
On 23 mar, 16:10, MartinBorthiry martin.borth...@gmail.com wrote:
Hello:
I'm using the validation plugin on my site to make remote
validations, and it is working graet!
But, I note that the ajax call is made allways. I think that that
call only has to be done when the input value has
You can replace the url-string with ajax-options:
remote: {
url: filename.php,
data: {
field2: function() { return $(#field2).val() }
}
}
Jörn
On Fri, Mar 6, 2009 at 2:43 AM, danc dgcri...@earthlink.net wrote:
Hi:
I have a warranty registration form where I am using validate.js to
Error found:
echo false;
} else {
echo true;
}
Do not response with boolean, string is expected.
On 23 Feb., 18:13, Sonya ayson...@googlemail.com wrote:
For remote validation, please show a code of check-email.php. I did
not find any example. My code:
Thats test code, nothing useful for an application. The code I posted
is what you'll want to use:
$(#myform).validate({
rules: {
username: {
required: true,
remote: {
url: checkusername.php,
type: post
data: {
email: function() { return $(#email).val()
hi
i just needed that option today!!
for the moment i just found a not-very-good way out which works for
me.
Among the pages you suggested i found this:
test(remote, customized ajax options, function() {
expect(2);
stop();
var v = $(#userForm).validate({
Wow..Jörn you're just great!!
Thanks a lot!
It works in chrome, firefox and ie6...
On 27 Nov, 13:16, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
Thats test code, nothing useful for an application. The code I posted
is what you'll want to use:
$(#myform).validate({
rules: {
username: {
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() }
}
}
}
}
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
I couldn't replicate the issue you describe, so I assume the problem
is on your serverside - nothing I could fix in the validation plugin.
Jörn
On Wed, Jun 18, 2008 at 8:21 PM, cryptid [EMAIL PROTECTED] wrote:
I am using Jörn's validation plugin to validate a form and I want to
validate a
13 matches
Mail list logo