Hi,

your question has pretty much been answered in one of the latest  
threads - see this thread 
http://groups.google.com/group/agavi-users/browse_thread/thread/adbd7397342974d9
 
. To sum things up: Yes, it can be done, you need to work with  
provides/depends. You need a validator that provides the dependency,  
the equals validator is most suitable for that. In your case you'd  
have this setup:

<validator class="equals" severity="info" provides="is_customer">
    <argument>category</argument>
    <ae:parameter name="value">customer</ae:parameter>
</validator>
<validator class="equals" severity="info" provides="is_employee">
    <argument>category</argument>
    <ae:parameter name="value">employee</ae:parameter>
</validator>

Any subsequent validator can then depend on those two. See this  
message for a more detailed explanation: 
http://groups.google.com/group/agavi-users/msg/44ae13b868436db5

felix

On Oct 6, 2009, at 9:37 AM, abhi p wrote:

> Hi,
>
>
> Is it possible to validate other fields based on the value of a  
> previous field ?
>
> For ex: I have select box for category with options 'employee'  and  
> 'customer'
> If user select value 'customer'  then i need to validate other field  
> like manager number etc.
>
> Is it possible to do it in validate xml file?  
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users

--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 89 57 08 15 16
F: +49 89 57 08 15 17
M: +49 172 840 88 28

[email protected]
http://www.bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to