Hello, I am having a problem validating a password field.
 
My requirement on my password is that it must be:
8 characters minimum length and contain at least one from each of the following 
groups: [a-z], [A-Z], and [0-9]. 
 
Here is what I have so far (which is not working):
 
<field name="emp.password">
<field-validator type="requiredstring">
<message key="Required"/>
</field-validator>
<field-validator type="stringlength"> 
<param name="minLength">8</param> 
<message>Must be 8 characters.</message>
</field-validator> 
<field-validator type="regex"> 
<param name="expression">^[a-z]+$</param>
<message>[a-z]</message> 
</field-validator> 
<field-validator type="regex"> 
<param name="expression">^[A-Z]+$</param>
<message>[A-Z]</message> 
</field-validator> 
<field-validator type="regex"> 
<param name="expression">^[0-9]+$</param>
<message>[0-9]</message> 
</field-validator> 
 
When I attempt to submit my form with correct data, it does not submit and 
states that I need a-z, A-Z, and 0-9.  What is going on here?
 
Here is my struts.xml for referance:
 
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd";>
<struts>
<package name="default" extends="struts-default">
<default-interceptor-ref name="paramsPrepareParamsStack"/>
<action name="Employee" class="action.EmployeeAction" method="edit">
<result name="success" type="redirect-action">EmployeeList!list.action</result>
<result name="input">/jsp/administration/employeeEntry.jsp</result>
<interceptor-ref name="paramsPrepareParamsStack"/>
</action>
</package>
</struts>
_________________________________________________________________
i’m is proud to present Cause Effect, a series about real people making a 
difference.
http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect

Reply via email to