I'll have to go with Jörn's answer, only it validates immediatey,
not after submit has already been clicked once (and the entire
Validation has already started)
Should i se a flag or something, if yes, how?

Thanks again,
Knal

On 2 mrt, 13:44, knal <knalp...@gmail.com> wrote:
> Great! Thanks for your fast reply.
> I will try it tonight.
>
> The reason why i need this, is that i'm trying to combine Validate
> with jNice.
>
> Thanks again,
> Knal
>
> On Mar 2, 1:35 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com>
> wrote:
>
> > You can use the valid-method to trigger the validation any time:
> > $("#contact_form").valid();
>
> > Jörn
>
> > On Mon, Mar 2, 2009 at 1:30 PM, knal <knalp...@gmail.com> wrote:
>
> > > Hi there,
>
> > > I have a form which is validated with the jQuery Validate PI.
> > > The JS roughly looks as follows:
>
> > > <code>
> > > var validator = $("#contact_form").validate({
> > >        rules: {
> > >                name: {
> > >                        required: true
> > >                }
> > >        },
> > >        messages: {
> > >                name: {
> > >                        required: "Required field"
> > >                }
> > >        },
> > >        errorElement: "span"
> > > });
>
> > > $(".myClass").click(function(){
> > >         // validate but don't submit
> > > });
> > > </code>
>
> > > What i want with the extra function, is to validate the form, but
> > > don't submit it. So it will manage the error messages, but won't take
> > > any further action. Also, i only want it to validate on myClass.click
> > > after the user has already tried ti submit, just like Validate's
> > > default behaviour.
>
> > > Hope things are clear.
>
> > > Many thanks,
> > > Knal

Reply via email to