struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suzette Daniel <sdan...@waca.com>
Subject RE: Validation (Heirarchy) Question
Date Tue, 22 Jul 2003 15:19:22 GMT
Hi Blake,

In your validation.xml in arg0 you need to specify the display value for
each field.
Most likely at the moment they are all set to "firstName".

<form name="modelInfoForm">	
	<field property="firstName" depends="required">
		<arg0 key="firstName.displayname" /> 
	</field>	
	<field property="middleName" depends="required">
		<arg0 key="middleName.displayname" /> 
	</field>
	<field property="lastName" depends="required">
		<arg0 key="lastName.displayname" /> 
	</field>
</form>

Suzette




-----Original Message-----
From: Blake Whitmore [mailto:blake_whitmore@yahoo.com] 
Sent: Tuesday, July 22, 2003 11:09 AM
To: Struts Users Mailing List
Subject: Validation (Heirarchy) Question


Hello All,

Please forgive me and just direct me to the old thread
if this is a re-post.  Ok here goes:

Here is something similar to my scenario, say I have a
form with three properties (firstName, lastName, and middleName).  For each
of these properties I specify in my validation.xml file 'required' and
'mask' (each field must match a regular expression [no numbers allowed]).
In the instance where I use the client-side validation and I click 'submit'
with an empty form - JavaScript cries and says, "First Name Required, Last
Name Required, Middle Name Required." 
That is perfect - it is just as I would expect... but,
when I enter a number in the First Name field (and
leave the others empty), JavaScript only tells me
'First Name is invalid.'  Is there an easy way to
configure the client side JS generation to validate
the other two fields as well?  In the scenario I just described, I would
hope to see 'First Name is invalid, Last Name is required, Middle Name is
required.'  I only have this problem with the JavaScript - the 'server side'
validation is fine.

Thanks!

Blake

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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

---------------------------------------------------------------------
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