Try $("#myfield").valid() - http://docs.jquery.com/Plugins/Validation/valid

To clear the cache: $("#myfield").data("previousValue", null);

Jörn

On Sun, Jan 4, 2009 at 8:07 PM, neo <tkolodziej...@gmail.com> wrote:

>
> Ok, so at least is there a possibility to run checking validation for
> one specified field? Something like $('my_field').validate()? But
> without cache for ajax.
>
> On Jan 3, 1:53 pm, neo <tkolodziej...@gmail.com> wrote:
> > Hi,
> >
> > I'm playing with validation and I encountered a problem. I have a text
> > input and a select button. I want to check whether they aren't empty
> > and check via ajax if it's valid (user's typing alias and domain)
> >
> > I was trying to disable validation for text input and just set it an
> > event which fires validation connected with the second field, but it
> > seems that there's problem with cache linked with ajax.
> >
> > My code:
> > domain:{
> >                                 required: true,
> >                                 alias: true,
> >                                 remote: {
> >                                         url: 'check.php',
> >                                         type: 'get',
> >                                         data: {
> >                                                 alias: function() {
> >                                                         return
> $('#alias').val();
> >                                                 }
> >                                         }
> >                                 }
> >                         }
> >
> > jQuery.validator.addMethod("alias", function(value, element) {
> >                 return $('#alias').val().length > 0
> >         }, "Please enter alias");
>

Reply via email to