You're right. I want to do '1-800-Struts-Help' or '1-111-1111'
I was very confused about the mask values in struts validation. 
clear now... Thanks.

--M

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Beal
Sent: Friday, October 01, 2004 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: validation - mask help

Peng, Meimin wrote:
> Thanks.
> 
> I just make it work by doing this.
> 
> <var-value>^[0-9a-zA-Z-\-]*$</var-value>
> 
> I couldn't find info on any strut books. But, here is the original
> validation package. Cheers!
> 
> http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html
> 

That will allow any number of '-' signs to be valid:

'------'
'a-------b'
'398-439-4381'
'39123951283--------------------'

will all be valid inputs.

Is that what you want, or do you want something like a serial number 
with any size fields, like:

dd-dddd-dddd-ddddd-ddd
ddddd-dd-dddd-ddd
dddd-ddddd-dddd

(where 'd' is any hex digit).

-- Jeff


CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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

Reply via email to