I am a newbie into programming and i am currently employed as a junior programmer. I am currently having some problems validating the select tags in one of my forms. What i actually trying to do is to ensure that one item is selected before the user submits the form .
In the form i have;
<s:select list="assessmentTypes" headerKey="0" headerValue=" -- Select One --"
listKey="id" value="name" listValue="name" key="course.assessmenttype"
name="assessmenttype.id"/>
I have some knowledge of validation but not to sure how to do it for the select list.
I tried using a normal validation with strings but i don t think it is required in this case. for example;
<field name="course.assessmenttype">
<field-validator type="requiredstring">
<message>Please Select a value</message>
</field-validator>
</field>
all help would be appreciated, Thanks in advance.