Thanks Niall, That was very helpful. 
   
  I have another issue with my validator.xml.  Based on my investigation, I 
have configured everything correctly. But there must be something wrong with 
this basic and barebone validator.xml file, because even if I change the form 
name to something bogus, I don't get any sort of errors.  So I think for some 
reason, my form name in struts-config doesn't map to the form name in 
validation.xml.  
   
  Note:
   -  I'm using tiles.  Do I need to do anything in my tiles-defs.xml.
   - Also, I'm using Struts 1.1 (although even though I'm using 1.1 I needed to 
add the commons-validator.jar to my classpath) 
   
  Here is my entire validation.xml:
   
  <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons 
Validator Rules Configuration 1.0//EN" 
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";>
   
  <form-validation>
  <formset>
  <form name="callingCardDeactivateForm">
    <field property="callingCard.deactivateDate" depends="required">
       <arg0 key="Field is Required for Date!" resource="false"/> 
     </field> 
  
    <field property="callingCard.comments" depends="required">
      <arg0 key="Field is Required for Comments!" resource="false"/> 
    </field> 
  </form> 
  
  
  </formset>
  
  /form-validation>
   
   
  From my struts-config.xml
  <action path="/request/callingcard/callingCardDeactivate"   
type="com.raytheon.its.action.request.callingcard.SubmitCallingCardDeactivateAction"
  name="callingCardDeactivateForm" 
  scope="request" 
  validate="true" 
  input="/WEB-INF/pages/request/callingcard/deactivateCallingCardRequest.jsp">
  <forward name="requestEntryPage" path="callingCardDeactivate" />
  </action>
  

Niall Pemberton <[EMAIL PROTECTED]> wrote:
  This explains how "key" is used:
http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section6

In respect of validator, although it has had a "bundle" attribute
(which is the same as "key" in struts-config.xml) for a while, it was
only actually supported since Struts 1.2.7 and Validator 1.1.4:

http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section7_2

Niall


On 5/10/06, josh t wrote:
> 
> 
>
> Can someone please explain to me how and where in my code I need to refer to 
> message-resources key? When doing validation, how does the validator know 
> where to loopup the ApplicationResources? Do I need to include the key 
> somwhere in my validator.xml?
>
> Thanks!
>
>
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



                
---------------------------------
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase 

Reply via email to