Did you try ^\d{4}$ 
Why do you include the * in your regexp - I think that's what's breaking it.

--
Voytek Jarnot


-----Original Message-----
From: Greg Dunn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 9:07 AM
To: Struts Users Mailing List
Subject: Struts Validator 4 digit numeric


I'm trying to use Struts Validator to validate a 4 digit numeric using a
mask:

<field
   property="ssn"
   depends="mask">
       <arg0 key="register.form.ssn.displayname"/>
       <var>
           <var-name>mask</var-name>
           <var-value>^[0-9]{4}*$</var-value>
       </var>
</field>

Which causes:

"Invalid expression: ^[0-9]{4}*$ Nested repetitions *?+ in expression"

The expression ^[0-9]^4*$ causes no exception but it throws out '0000' as
not
valid.  (Obviously I have work to do on regular expressions.)  Any
assistance is appreciated.


Greg


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

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

Reply via email to