Re: Validator : date

2003-07-17 Thread Phil Shrimpton
On Thursday 17 July 2003 13:15, Michael Nascimento Santos wrote:

Hi,

> You must define a datePattern var in your validation.xml config, such as:
>
> 
> 
>   datePattern
>   MM-dd-
> 
> 

Same error, but if I change it to...

var-name>datePatternStrict

..it works.  Also, according to the docs I have, you don't need to supply the 
datePattern, as it will default to the locales short date format

Phil

-- 
  2:02pm  up 92 days,  2:55,  1 user,  load average: 0.02, 0.04, 0.01
   ICQ: 760757   AIM: pjshrimpton   Y!: pjshrimpton

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator : date

2003-07-17 Thread Michael Nascimento Santos
You must define a datePattern var in your validation.xml config, such as:



  datePattern
  MM-dd-



This way, the validator knows when the value entered is valid according to
your pattern. In my example, 07-17-03 would be valid, but not 17-07-03.

[]s
Michael Nascimento Santos
JSR-207 Expert Group Member
Sun Certified Programmer for the Java 2 Platform
Sun Certified Programmer for the Java 2 Platform 1.4
Sun Certified Web Component Developer for J2EE
Moderador SouJava - www.soujava.org.br

- Original Message - 
From: "Phil Shrimpton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 17, 2003 10:06 AM
Subject: Validator : date


> Hi,
>
> I am having problems with client side date validation in 1.1.  If I set
the
> depends value to include 'date', there seems to be a problem in the
> javascript generated.  I get the following error..
>
> Error: Length is null or not an object.
>
> The Error seems to be in the validation-rules.xml for the date valadation,
> line 12
>
>  (datePattern.length > 0)) {
>
> Any ideas?
>
> Phil
> -- 
>  12:56pm  up 92 days,  1:49,  1 user,  load average: 0.34, 0.13, 0.05
>ICQ: 760757   AIM: pjshrimpton   Y!: pjshrimpton
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validator : date

2003-07-17 Thread Phil Shrimpton
Hi,

I am having problems with client side date validation in 1.1.  If I set the 
depends value to include 'date', there seems to be a problem in the 
javascript generated.  I get the following error..

Error: Length is null or not an object.

The Error seems to be in the validation-rules.xml for the date valadation, 
line 12

 (datePattern.length > 0)) {

Any ideas?

Phil
-- 
 12:56pm  up 92 days,  1:49,  1 user,  load average: 0.34, 0.13, 0.05
   ICQ: 760757   AIM: pjshrimpton   Y!: pjshrimpton

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]