You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/11/08 07:59:29 UTC
DO NOT REPLY [Bug 14380] New: -
Validator Mask - regular expression
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14380>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14380
Validator Mask - regular expression
Summary: Validator Mask - regular expression
Product: Struts
Version: 1.1 Beta 1
Platform: PC
OS/Version: Windows NT/2K
Status: UNCONFIRMED
Severity: Enhancement
Priority: Other
Component: Validator Framework
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: richmondte@yahoo.com
CC: richmondte@yahoo.com
Currently, the struts validation framework allows you to validate based on any
number of "dependencies", among them: float, double, mask, range, etc. In my
validation.xml file I have a parameter that I am attempting to validate based
on three dependencies: required,mask,range. I would like a user to be
able to enter a string in the format eg. "Smith-Jones & Sons* Pty/Ltd"
Everything works for me *except* for the "mask" dependency.
The "mask" uses a-z, A-Z, 0-9, and the characters /&*- plus spaces in the
input. It was able to handle a-z, A-Z, 0-9 and spaces but the slash, ampersand,
asterisk and hyphen does not seem to work. The whole validation is skipped when
the other character are added in the expression.
Here is what I currently have defined in the regular expression:
^[A-Za-z0-9\s+]*$
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>