What data type of the property [yourAnswer] is ?

If it is an int property, try delete the double-quotation surrounding
the value 1.



2010/11/15 Prabhubalaji Ragavan <prabhubalaji.raga...@gmail.com>:
> Hi
> I am using a radio option in my code. when i try to validate that thru the
> validator.xml, the validation is not happening.
>
> this is my jsp content.
>
> <s:radio label="Answer" name="yourAnswer" list="#{'1':'Yes','2':'No'}" />
>
> this is my validator.xml content
>
> <field name="yourAnswer">
>       <field-validator type="fieldexpression">
>            <param name="expression"><![CDATA[(yourAnswer == "1")]]></param>
>            <message>enter gen1</message>
>    </field-validator>
>    </field>
>
>
> Please help, am new to struts2.
>
> Thanks
> Prabhu Ragavan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to