Hi,Thank, It works with fieldexpression.
I tried this : 
    <validator type="fieldexpression">
        <param name="fieldname">personBean.over21</param>
        <param name="expression"><![CDATA[personBean.over21 == true]]></param>
        <message>You must be 21 or older</message>
    </validator>     

Be carreful, double egal sign is good for comparaison, but only one egal sign 
is an affectation !
 = = = = = = = = = = = = = = = =  = = = = = = = =  = = =
I tried also the inverse : with 
        <param name="expression"><![CDATA[personBean.over21 == false]]></param>
        <message>You must be under 21</message>
And it works too !
 


     Le Mercredi 21 octobre 2015 12h39, Lukasz Lenart <lukaszlen...@apache.org> 
a écrit :
   

 2015-10-21 12:22 GMT+02:00 Chris <christal...@yahoo.fr>:
> Hi,
>
> I don't know what PRs means.  :-)

PR means Pull Request on GitHub - a change from some other user

> I already tried "required" with checkbox, but it doesn't work.
>    <validator type="required">
>        <param name="fieldname">personBean.over21</param>
>        <message>You must be 21 or older</message>
>    </validator>
>
> ...( checked or not is always OK)

interesting ... try with
http://struts.apache.org/docs/fieldexpression-validator.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

Reply via email to