When i am using validwhen,getting error as

[TryEngagementForm1] ERROR [main] AbstractBeanValidator.validate(66) |
Exception while validating object null
org.apache.commons.validator.ValidatorException: No ValidatorAction named
validwhen found for field typeOfReqSupportNo
        at
org.apache.commons.validator.Field.handleMissingAction(Field.java:867)
        at org.apache.commons.validator.Field.validate(Field.java:843)
        at org.apache.commons.validator.Form.validate(Form.java:290)
        at
org.apache.commons.validator.Validator.validate(Validator.java:354)
        at
org.springmodules.validation.commons.AbstractBeanValidator.validate(AbstractBeanValidator.java:63)
        at
org.springframework.validation.ValidationUtils.invokeValidator(ValidationUtils.java:63)
        at
org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidate(BaseCommandController.java:373)
        at
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:248)
        at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)


i have done following in validation.xml

<field property="typeOfReqSupportNo" depends="validwhen">
                                        <arg position="0" 
key="engagementform.typeOfReqSupportNo"/>
                                                <var>
                                                <var-name>test</var-name>
                                                <var-value>(typeofRequest = 
'Support')</var-value>
                                                 </var>
                                </field> 

I don't have any <validator> in validation-rules.xml for validwhen.



Msarda wrote:
> 
> Thank you very much :)
> 
> 
> mraible wrote:
>> 
>> You may be able to use Commons Validator's ValidWhen:
>> 
>> http://struts.apache.org/1.3.8/faqs/validator.html
>> 
>> If that doesn't work, you can change your Controller's "validator"
>> property to a "validators" property and pass in a list of properties
>> (one for beanValidator and one for your custom Spring Validator that
>> performs additional logic).
>> 
>> Matt
>> 
>> On 7/10/07, Msarda <[EMAIL PROTECTED]> wrote:
>>>
>>> I am using spring framework (basic) with appfuse 2.0-m5 and maven 2.0.6
>>>
>>>
>>> mraible wrote:
>>> >
>>> > Which web framework (and version of AppFuse) are you using?
>>> >
>>> > On 7/10/07, Msarda <[EMAIL PROTECTED]> wrote:
>>> >>
>>> >> Hi all,
>>> >>
>>> >> I want to do validation for a field depending on the value of other
>>> field
>>> >> in
>>> >> validation.xml.
>>> >>
>>> >> I have two radio buttons,each one having a text box in front of them
>>> to
>>> >> fill
>>> >> value if that particular radio button is selected.
>>> >> I just want to check that if the radio button is selected,there
>>> should be
>>> >> some value in textbox.
>>> >>
>>> >> I tried doing that in jsp only with alret() but the form is getting
>>> >> submitted before changing/adding the value.
>>> >>
>>> >> Can anybody please guide me in this problem.
>>> >>
>>> >> Thanks.
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Conditional-Validation-tf4059682s2369.html#a11533632
>>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > http://raibledesigns.com
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Conditional-Validation-tf4059682s2369.html#a11533723
>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
>> -- 
>> http://raibledesigns.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Conditional-Validation-tf4059682s2369.html#a11534266
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to