It's not a secret anymore!
The moose likes Struts and the fly likes drop down list validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "drop down list validation" Watch "drop down list validation" New topic

drop down list validation

K Amin

Joined: Oct 11, 2007
Posts: 8
Can any body give me a little example, how to validate for picking up a specific value from a dropdown list, the dropdown list is generated with some file names from a folder location. I am using client site validation for other form fields.

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You validate a dropdown field the same as you would any other field by defining the validation in the validation.xml file. If you're using the "required" validation, you must include a null value option to indicate that the user hasn't selected anything. Example:

Consultant, Sima Solutions
I agree. Here's the link:
subject: drop down list validation
It's not a secret anymore!