struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poon, Johnny" <Johnny.P...@ANICO.com>
Subject RE: validator validwhen not working?
Date Wed, 09 Jul 2003 19:50:32 GMT
David,

I'm using jakarta-struts-1.1-rc2.  Is that what you considered a 1.1 final?
How can I find out whether if validwhen is in my struts?

I also tried to install the nightly builds jakarta-struts-20030605.zip, it
is still not working.  Any other clue?

Thanks in advance!

JP

-----Original Message-----
From: David Graham [mailto:grahamdavid1980@yahoo.com]
Sent: Wednesday, July 09, 2003 11:56 AM
To: Struts Users Mailing List
Subject: Re: validator validwhen not working?


Are you using a nightly build after 1.1 final?  ValidWhen was not included
with 1.1.

David

--- "Poon, Johnny" <Johnny.Poon@ANICO.com> wrote:
> Hi,
> 
> I'm trying to use validwhen, so that it's only valid when either all
> three
> related fields are empty or are filled, it's valid; otherwise not. 
> ssn_1,
> ssn_2, and ssn_3 are the field names.  For some reason, when I put this
> in,
> none of the validation takes place, not even required, minlength,
> maxlength,
> nor mask, which all worked before I put validwhen in there.  Did I do
> anything wrong?
> 
> Here's the one of the fields in my validation.xml file:
> 
> <field property="ssn_1" depends="validwhen, required, minlength,
> maxlength,
> mask">
> 	<msg name="required" key="errors.required.enter" />
> 	<msg name="minlength" key="errors.minlength.digit" />
> 	<msg name="maxlength" key="errors.maxlength.digit" />
> 	<msg name="mask" key="errors.mask.numeric" />
> 	<arg0 key="ssn_1.displayName" />
> 	<arg1 name="minlength" key="${var:minlength}" resource="false" />
> 	<arg1 name="maxlength" key="${var:maxlength}" resource="false" />
> 	<var>
> 		<var-name>test</var-name>
> 		<var-value>( (*this* == null) and (ssn_2 == null) and (ssn_3
> == null) )</var-value>
> 	</var>
> 	<var>
> 			<var-name>minlength</var-name>
> 			<var-value>3</var-value>
> 	</var>
> 	<var>
> 			<var-name>maxlength</var-name>
> 			<var-value>3</var-value>
> 	</var>
> 	<var>
> 			<var-name>mask</var-name>
> 			<var-value>^\d*$</var-value>
> 	</var>
> </field>
> 
> Thanks.
> 
> JP.
> 
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> **********************************************************************
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


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


Mime
View raw message