2

Simple: I have to be sure the privacy checkbox on my form is checked. I tryed to use the expression validator (and the fieldexpression validator) but it does'n work. Can anobody help me?

s.susini
  • 601
  • 1
  • 9
  • 18

2 Answers2

0

Can you provide more information? How were you using the expression validator, and why didn't it work? Seems like that approach should work fine.

A few things to consider: do you have both a "getter" and a "setter" method for your boolean? Do you have both the "validation" and the "workflow" interceptors in your interceptor stack (the "defaultStack" does, for example).

Todd Owen
  • 15,650
  • 7
  • 54
  • 52
0

This worked for me:

<field name="agreeToPrivacy">
    <field-validator type="expression" >  
    <param name="expression">agreeToPrivacy == true</param>  
            <message>You must agree to the privacy agreement to continue.</message>  
    </field-validator>
</field>
Ron Romero
  • 9,211
  • 8
  • 43
  • 64