Hello. I'm trying to create a mask for use in password fields that accepts: - UPPERCASE A-Z - lowercase a-z - Numbers 0-9 - Special Characters !,@,#,$,%,^,&,(,), and *
In the "validation.xml" file I have the following defined.
<form-validation> <global> <constant> <constant-name>password</constant-name> <constant-value>[EMAIL PROTECTED]&*()]*$</constant-value> </constant> </global> ... ... </form-validation>
When I start my application server (Tomcat 5.x) and the struts validation code starts to load my rules I get the following messages:
11-04-2004 11:46:19 struts.validator.ValidatorPlugIn - Loading validation rules file from '/WEB-INF/validator-rules.xml'
11-04-2004 11:46:19 struts.validator.ValidatorPlugIn - Loading validation rules file from '/WEB-INF/validator-rules-custom.xml'
11-04-2004 11:46:19 struts.validator.ValidatorPlugIn - Loading validation rules file from '/WEB-INF/validation.xml'
11-04-2004 11:46:20 commons.digester.Digester - Parse Fatal Error at line 22 column 39: The entity name must immediately follow the '&' in the entity reference.
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
Removing the '&' from the constant-value allows the application to start properly, however I can't use the '&' as a valid input character.
Going to the url below to use the regexp sample applet, my original string with the '&' does work.
http://jakarta.apache.org/regexp/applet.html Regular Expression: [EMAIL PROTECTED]&*()]* String: [EMAIL PROTECTED]()^&done
I am using commons-validator 1.1.3 with Struts 1.2.4
Any thoughts, fixes, or suggestions are much appreciated.
Brian
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]