You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Prashant Samant <Pr...@mphasis.com> on 2003/07/17 10:58:29 UTC

Problem while using validator framework

Hello everybody,
I am trying to run a small application which validates a field.
But when i run the appilcation, i am getting the following error
" Validator - -No ValidatorAction called validwhen found for field method"

The following is my struts.config file
<struts-config>
<form-beans>
		   
	<form-bean name="orderForm" type="org.apache.struts.validator.DynaValidatorForm">
		<form-property name="order" type="java.lang.String"/>
		<form-property name="method" type="java.lang.String"/>
		<form-property name="cardtype" type="java.lang.String"/>
	</form-bean>
 </form-beans>

  <action-mappings>
	<action path="/order"
        	type="OrderAction"
        	name="orderForm"
        	input="/order.jsp"
        	scope="request">
	<forward name="success" path="/orderconfirm.jsp"/>          
	<forward name="failure" path="/nobuy.jsp"/>          
	</action>
  </action-mappings>
  
  
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
      value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
  </plug-in>
  
<message-resources parameter="ApplicationResources" null="false" />

</struts-config>


The following is my validation.xml
<formset>
       
	<form name="orderForm">
	     <field property="method"  depends="validwhen">
	       <arg0 key="Payment method" resource="false"/>
	     <var>
	       <var-name>test</var-name>
	       <var-value> (*this* != null)</var-value>
	     </var>
	   </field>

	</form>
 </formset>

i am using weblogic 6.1.
pls advise .
Prashant S.

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


Re: Problem while using validator framework

Posted by Nagendra Kumar O V S <na...@ikigo.com>.
hi,
"validwhen" is not defined in ur validator-rules..

and i guess u have gone thro' the 1.1 release docs.. which talks about
implementing the validwhen validator in the next release..
as of now it does't have validwhen rule

-- nagi



-------Original Message-------

From: Struts Users Mailing List
Date: Thursday, July 17, 2003 02:27:52 PM
To: Struts Users Mailing List (E-mail)
Subject: Problem while using validator framework

Hello everybody,
I am trying to run a small application which validates a field.
But when i run the appilcation, i am getting the following error
" Validator - -No ValidatorAction called validwhen found for field method"

The following is my struts.config file
<struts-config>
<form-beans>

<form-bean name="orderForm" type="org.apache.struts.validator
DynaValidatorForm">
<form-property name="order" type="java.lang.String"/>
<form-property name="method" type="java.lang.String"/>
<form-property name="cardtype" type="java.lang.String"/>
</form-bean>
</form-beans>

<action-mappings>
<action path="/order"
type="OrderAction"
name="orderForm"
input="/order.jsp"
scope="request">
<forward name="success" path="/orderconfirm.jsp"/> 
<forward name="failure" path="/nobuy.jsp"/> 
</action>
</action-mappings>


<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

<message-resources parameter="ApplicationResources" null="false" />

</struts-config>


The following is my validation.xml
<formset>

<form name="orderForm">
<field property="method" depends="validwhen">
<arg0 key="Payment method" resource="false"/>
<var>
<var-name>test</var-name>
<var-value> (*this* != null)</var-value>
</var>
</field>

</form>
</formset>

i am using weblogic 6.1.
pls advise .
Prashant S.

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


.