[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-24 Thread Jörn Zaefferer
Take a look at the milk-demo: http://jquery.bassistance.de/validate/demo/milk/ It's errorPlacement-usage should be a good reference: // the errorPlacement has to take the table layout into account errorPlacement: function(error, element) { if ( element.is(:radio)

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-24 Thread pixelyzed
OK, after reading the docs a little more closely I came up with the following which I added to the code above and which AFAIK should work: var loginValidator = $(#inscriptTalentProfessionnel).validate( { errorElement: div, onsubmit: true, onfocusout: true, errorPlacement:

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-24 Thread Jörn Zaefferer
element is a jQuery object, try element[0].name or element.attr(name) Jörn On Tue, Jun 24, 2008 at 6:11 AM, pixelyzed [EMAIL PROTECTED] wrote: OK, after reading the docs a little more closely I came up with the following which I added to the code above and which AFAIK should work: var

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-24 Thread pixelyzed
H Jörn, I actually posted that before I saw your previous reply which gave me what I needed to solve that error message placement issue. I have one more question though. How could I disable the submit button until the form is all valid? Thanks very much for your help so far.

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-24 Thread Jörn Zaefferer
The plugin has no direct support for that. You can disable the submit button in the submitHandler-option (a callback) to prevent a double submit: $(...).validate({ submitHandler: function(form) { $(:submit, form).attr(disabled, true); form.submit(); } }); Disabling the button before

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-23 Thread Jörn Zaefferer
I've changed the section title slightly, hopefully this makes it easier to find them: http://docs.jquery.com/Plugins/Validation#List_of_built-in_Validation_methods Custom methods are added via $.validator.addMethod: http://docs.jquery.com/Plugins/Validation/Validator/addMethod#namemethodmessage

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-23 Thread Lashiec
I've got another question about this plugin... On one of my pages I have a form, it has 4 fields a person can input. I only want to validate two of them, both text boxes. The thing is that this form can have multiple inputs of the same type. It's for a CMS I'm building, and it's adding different

[jQuery] Re: Questions Validation Plugin (bassistance)

2008-06-23 Thread pixelyzed
Hello Jörn, Thank you for your help earlier. I'll try to figure out custom methods later. Right now I'd like to know if it's possible to change the errorPlacement option for only one specific messgae. I'm trying to validate multiple checkbox and radiobuton groups and I have the default