You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Dunn <gr...@nisc.cc> on 2002/11/27 16:07:15 UTC

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>