I'm attempting to add password strength validation to the user object.
Here's what I've added to the validation.xml
<constant>
<constant-name>password</constant-name>
<constant-value>^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{6,20}$</constant-value>
</constant>
This Reg Expression I'm told requires a password to have a least 1
uppercase letter, 1 digit and a minimum length of 5 characters.
<form name="user">
<field property="username"
depends="required">
<arg0 key="user.username"/>
</field>
<field property="password"
depends="required,twofields,mask">
<msg
name="mask"
key="errors.password"/>
<msg
name="twofields"
key="errors.twofields"/>
<arg0 key="user.password"/>
<arg1
key="user.confirmPassword"
/>
<var>
<var-name>secondProperty</var-name>
<var-value>confirmPassword</var-value>
</var>
<var>
<var-name>mask</var-name>
<var-value>${password}</var-value>
</var>
</field>
The solution works for adding new users, but if you try to edit an existing
user the validation fails because the encrypted password is been validated.
This I sure is a common requirement but I can find a common solution.
Can someone help, please?
Thanks
-Paddy
--
View this message in context:
http://www.nabble.com/User-Password-strength-tp15459586s2369p15459586.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]