Did it this way. Passed field names via the  tag, then obtained values inside
the validator class using getFieldValue(fieldName, object).

Thank you for suggestions.


stanlick wrote:
> 
> Rather than pass this, that and the other parameter(s) to your validator,
> why not just retrieve what you need from inside the validator?  You have
> the
> ActionInvocation passed to your doIntercept(...), which contains the
> ValueStack containing your objects.
> 
> Peace,
> Scott
> 
> 
> 
> On Tue, May 19, 2009 at 7:59 AM, manub <[email protected]> wrote:
> 
>>
>> Hi all,
>>
>> I'm trying to write a custom field validator which needs other fields to
>> validate the field I need to validate. How can I pass field values (and
>> not
>> static params) to a field validator in the validation xml? I'm using
>> Struts
>> 2.1.6.
>>
>> Thank you.
>> --
>> View this message in context:
>> http://www.nabble.com/passing-form-parameters-to-a-custom-validator-tp23615918p23615918.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/passing-form-parameters-to-a-custom-validator-tp23615918p23651619.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to