Gary,if(!/^[0-9]{16}$/.test(account_no.value)) { //This is invalid }
will match an account number with no spaces.many thanks for that heads up. All is working a treat now.regardsAndrew
-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: 05 July 2006 13:13
To: users@cocoon.apache.org
Subject: Re: Widget javascript validation problem
> The other problem I am having is with the widget datatype definition for
> account_no:
>
> fd:datatype b
Gary,At a glance it looks like *account_no.setValidationError* is wrong as you declared the variable as *accountNumberLength*. This is why I like strict type checking.
that now works fine now. I remember having done the same mistake a while ago, and was trying to chek against the actual widget id I
-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: 05 July 2006 12:31
To: users@cocoon.apache.org
Subject: Widget javascript validation problem
>
>
>var success = true;
>var creditCardType = widget.lookupWidget("credi
Hi,I am having an issue with a widget form validation under cocoon 2.1.8. Basically what I have is a selection box with various credit card types, (visa, matercard...) etc, and based on the card selected a check is done on the credit card number field to make sure that the number of digits entered