struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suzette Daniel <>
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 property="middleName" depends="required">
		<arg0 key="middleName.displayname" /> 
	<field property="lastName" depends="required">
		<arg0 key="lastName.displayname" /> 


-----Original Message-----
From: Blake Whitmore [] 
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.



Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message