You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yosh-Rinaldy <YR...@OfficeDepot.com> on 2002/09/11 22:40:27 UTC
Using Mask Validation in Struts Validator
Hope anyone can help.
We are using Struts 1-1b2, and I imported the latest Jakarta ORO package,
Commons BeanUtils, Logging, Collections and Digester
We are using Validator Framework to perform validation, and we successfully
implemented the "required, minlength, maxlength" validations.
However, when I tried to implement "mask" for email, phone, zip using reg
expression, it doesn't seem to work.
Here is my validator-rules.xml:
<validator name="mask"
classname="org.apache.struts.util.StrutsValidator"
method="validateMask"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest"
depends="required"
msg="errors.invalid">
And here is my validator.xml:
<form-validation>
<global>
<constant>
<constant-name>zip</constant-name>
<constant-value>^\d{5}\d*$</constant-value>
</constant>
</global>
<formset>
<form name="DateTestBean">
<field property="zip"
depends="required, mask">
<arg0 key="entry.zip"/>
<var>
<var-name>mask</var-name>
<var-value>${zip}</var-value>
</var>
</field>
</form>
</formset>
</form-validation>
Hope anyone can help.
Thanks,
Yosh
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: jsp tomcat and struts
Posted by Miguel Angel Mulero Martinez <mi...@mad.tecsidel.es>.
I use frames and I have a login page, and all works perfectly. What's your
problem?
-----Mensaje original-----
De: Frederic Barozzi [mailto:frederic.barozzi@ifrance.com]
Enviado el: martes, 01 de octubre de 2002 14:49
Para: Struts Users Mailing List
Asunto: jsp tomcat and struts
Hi,
I've got a forward in my struts-config.xml to a /form/main.jsp.
My main.jsp calls tree frames. It works fine when i call
http://localhost:8080/myApp/form/main.jsp
but not after a login jsp page with the forward condition explained in the
struts-config.xml.
I read there are problems with frame but i don't really understant which
ones
any idea, or help ?
regards
Fred
________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros
d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert !
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
jsp tomcat and struts
Posted by Frederic Barozzi <fr...@ifrance.com>.
Hi,
I've got a forward in my struts-config.xml to a /form/main.jsp.
My main.jsp calls tree frames. It works fine when i call
http://localhost:8080/myApp/form/main.jsp
but not after a login jsp page with the forward condition explained in the
struts-config.xml.
I read there are problems with frame but i don't really understant which
ones
any idea, or help ?
regards
Fred
________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert !
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>