[jQuery] [validate] credit card number validation fix

2009-04-26 Thread d...@amystdesign.com

I was using an input mask plug-in on the form as well, which I found
was causing the creditcard validator to fail (due to the spaces in the
mask between the (4) character groups).

This was fixed by moving line: 1017 to just above line: 1011 which
tests for only characters [^0-9-].

This could also have been fixed by adding a space to the regular
expression but since the replacement line is already in the code, just
moving it accomplishes what we're after.


[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread d...@amystdesign.com

It will be confusing for someone filling out your form if you leave
both fields available at the same time, instead... when the user
enters text into one of the fields why don't you run an onChange or
onKeyPress check to see if they've entered something and if so,
disable/hide the other field .attr('disabled', disabled') or .hide()
or if they have deleted what's in the field to enable/hide the partner
field again... just remember to include null checks to unset the
disabling/hiding



On Oct 12, 3:55 am, Phper  wrote:
> Also, how to prevent a user filling out both fields?
>
> On Oct 12, 4:48 pm, Phper  wrote:
>
> > How to change the default position of an error message in Jquey form
> > validation plugin?
>
> > On Oct 12, 4:33 pm, Gordon  wrote:
>
> > > If you're using the Metadata plugin and inline rules:
>
> > > 
> > > 
>
> > > I've not actually tested it but it should work.
>
> > > On Oct 11, 4:37 am, Phper  wrote:
>
> > > > There are two input fields in a form, but only one of them is
> > > > required, they are not required at the same time. Either A or B is
> > > > required. ( A is required  OR B is required). In other words, a user
> > > > can input data to field A, or he can input data to filed B, but he can
> > > > not input data to Both A and B at the same time.
>
> > > > How to implement this constraint in Jquery form validation?


[jQuery] Re: $("ul li a").hover

2010-01-15 Thread d...@amystdesign.com
That depends upon which element has the ID or class that you're hoping
to select, for instance, if you have:

   List Item Text


or

 wrote:
> Hi,
>
> Im new to jquery.
>
> I have a .hover that is applied to all ul li a
> $("ul li a").hover
>
> Question: How can I apply the .hover to a specific class or id?
>
> I tried something like this but it didn't work for me:
> $("#test ul li a").hover
> $("test ul li a").hover
>
> Thanks