title: struts2 validator expression
body: <p>Is possible to make this conditional expression validation?:</p>
  
  <pre><code>(invitation.id==null and (newText==null or newText.isEmpty()))
  </code></pre>
  
  <p>I've tried several ways, several times, but don't achieve it.
  This version is working, but on server-side, and ignore if invitation.id is null or empty... any ideas???:</p>
  
  <pre><code>&lt;field name="newText"&gt;
     &lt;field-validator type="fieldexpression"&gt;
        &lt;param name="expression"&gt;!(invitation.id eq null and (newText eq null or newText.empty))&lt;/param&gt;
        &lt;message&gt;${getText("validation.required")}&lt;/message&gt;
     &lt;/field-validator&gt;
  &lt;/field&gt;
  </code></pre>
  
  <p><a href="http://struts.apache.org/release/2.2.x/docs/fieldexpression-validator.html" rel="nofollow">http://struts.apache.org/release/2.2.x/docs/fieldexpression-validator.html</a></p>
  
  <p><strong>what is wrong with the expression??  Thanks!</strong></p>