I have a selection box with options where the first is valued 0 (=not
selected) with some label saying: "month". How can I use the Struts
validator to validate the user has actually chosen a value other than 0?
Do I have to write one of my own? I wish the validwhen was around...

By the way the 'birthMonth' is an int (not a string).

Here is a snip of my page:

                        <html:select property="birthMonth">

                                <html:option value="-1">
                                        <bean:message key="date.month"/>
                                </html:option>

                                <c:forEach begin="1" end="12" var="m">
                                        <html-el:option value='${m}'>
                                                <c:out value='${m}' />
                                        </html-el:option>
                                </c:forEach>
                        </html:select>


Thanks a lot,
Erez



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

Reply via email to