Joe Germuska <Joe <at> Germuska.com> writes:

> 
> At 12:14 PM -0700 7/14/05, Jay Burgess wrote:
> >Yes.  It's because the leading zero is saying the numbers are 
> >"octal", so 01-07
> >are valid octals, 08-09 are invalid octals, and 10-12 are valid octals.
> 
> Jay's exactly right here.  Your options:
> 
> (1) hack the Javascript validation; commons-validator provides a 
> mechanism for specifying your own Javascript and falls back to 
> loading it from the commons-validator.jar (well, in recent versions; 
> in earlier versions, the javascript was in the config XML files and 
> hacking it will be pretty obvious.)  I'm pretty sure the server-side 
> validation doesn't care about octals.
> 
> (2) use a "mask" validator with a pattern like ^(0[1-9]|1[0-2])$
> 
> Joe

Yes, the server side works fine. As you said I think it doesn't care about the 
Octal. Indeed I thought about writing a custom validation method but I was 
wondering about that peculiar behaviour. I will try your suggestions also.
siva




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

Reply via email to