commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <j...@wendysmoak.com>
Subject [validation] Help with 'contains' validation
Date Mon, 28 Feb 2005 21:16:39 GMT
I'm trying to validate a password such that it cannot contain the userId.
Is this something I can do in validation.xml?

I'm currently using a mask in validation.xml:
 <field property="password" depends="required,mask">
            <arg0 key="label.password"/>
            <var>
               <var-name>mask</var-name>
               <var-value>^[0-9a-zA-Z!%*-_+=:,\./?]*$</var-value>
            </var>
   </field>

(And I'm not very good at regular expressions, so if there's a better way to
say "letter, digit, or any of these special characters, I would appreciate a
suggestion.)

Can it be done with validwhen?  How do I say "does not _contain_ userId"?
I'd like it to be case insensitive, but could live without that if it's
easier.

Thanks,
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message