This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes how do you write a validator that validates a field based on another field? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how do you write a validator that validates a field based on another field?" Watch "how do you write a validator that validates a field based on another field?" New topic
Author

how do you write a validator that validates a field based on another field?

Khopkar Amarish
Greenhorn

Joined: Dec 29, 2005
Posts: 11
Does anybody know how you write a validator that validates a field based on another field? What I have is a radio button and a text field. The radio button has 3 options let's say A, B and C. Only if the item B is selected, then I want to validate the text field based on some regular expression criteria.

Is there a way for me to write a Custom Validator to do this 'conditional' validation, or do I need to just do manual validation of the form?

Amarish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how do you write a validator that validates a field based on another field?
 
Similar Threads
Validation skip
Custom validation ignored
Struts2:Conditional visitor validator not conditional
struts2 radio button validation
question about validating multiple fields