struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marisol Opreni" <marisol.opr...@patagonia-tech.com>
Subject RE: Mask validation
Date Tue, 25 Apr 2006 14:49:28 GMT

If the user enters less than 8 char appears a message...
If he enters more than 8 char appears a message...
I don't want to drive him mad ;)

With the mask validation I want to show only ONE message to the user...


-----Mensaje original-----
De: Kalcevich, Daniel [mailto:dkalcevich@firstam.com] 
Enviado el: Martes, 25 de Abril de 2006 11:44 a.m.
Para: Struts Users Mailing List
Asunto: RE: Mask validation

You could use the minlength validation then as well, and then if you use
Struts HTML Tags, set the maxlength=8 on the text box.  That way the
user would be required to entered in at least 8 (as dictated by the
minlength) and no more than 8 (as dictated by the maxlength on the input
box).

Does that do what you are looking for?

Daniel

-----Original Message-----
From: Marisol Opreni [mailto:marisol.opreni@patagonia-tech.com] 
Sent: Tuesday, April 25, 2006 7:40 AM
To: 'Struts Users Mailing List'
Subject: RE: Mask validation

I need to be 8 characters, nor more neither less... 

-----Mensaje original-----
De: Kalcevich, Daniel [mailto:dkalcevich@firstam.com] 
Enviado el: Martes, 25 de Abril de 2006 11:33 a.m.
Para: Struts Users Mailing List
Asunto: RE: Mask validation

Remove the {8} from the Mask and also include the maxlength validation
on that field. Something like this:

<field property="field1" depends="mask,maxlength">
	<arg0 key="mykey"/>
	<arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
	<var>
		<var-name>maxlength</var-name>
		<var-value>8</var-value>
	</var>
	<var>
		<var-name>mask</var-name>
		<var-value>^[a-zA-Z0-9\]*$</var-value>
	</var>
</field>

Daniel

-----Original Message-----
From: Marisol Opreni [mailto:marisol.opreni@patagonia-tech.com] 
Sent: Tuesday, April 25, 2006 7:30 AM
To: 'Struts Users Mailing List'
Subject: Mask validation

Hi.

How can I specify a mask with letters, underscores and numbers with only
8
charaters in total?

Something like this? <var-value>[a-zA-Z0-9]{8}$</var-value>

 

Thanks!

Marisol.

 


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





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


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





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


Mime
View raw message