Ultimately I need to do some cross field validation and thought I would use a custom validator to do this. But I can't even get a simple example to work. The following code (which is pretty similar to that on p.116 of "Mastering XPages" allows any value (including an empty field). Am I missing something obvious?
<xp:inputText
id="field1"
value="#{document1.field1}">
<xp:this.validators>
<xp:customValidator>
<xp:this.validate><![CDATA[#{javascript:if (value == "") {
return new javax.faces.application.FacesMessage("Please enter a value");
}}]]></xp:this.validate>
</xp:customValidator>
</xp:this.validators>
</xp:inputText>