I am learning xpages and trying different things, working through tutorials etc. I have a simple xpage to submit data to a form. It worked until I decided to use a regex in the validate constraint property. The validator works, but the submit button no longer updates the form when the data is in the correct format. The code is below. The problematic code is set off by ***. We are running Domino 8.5.2. No error messages in log.
Thanks,
---Lisa&
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
<xp:dominoDocument var="NameList" formName="NameList"></xp:dominoDocument>
</xp:this.data>
<xp:table>
<xp:tr>
<xp:td>
<xp:label value="Firstname:" for="firstname1" id="Firstname_label"></xp:label>
</xp:td><xp:td>
<xp:inputText value="#{NameList.Firstname}" id="firstname1"></xp:inputText>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label value="Lastname:" id="Lastname_label" for="lastname1"></xp:label>
</xp:td><xp:td>
<xp:inputText value="#{NameList.Lastname}" id="lastname1"></xp:inputText>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label value="Email:" id="Email_Label"></xp:label></xp:td>
<xp:td>
<xp:inputText id="email1" value="#{NameList.Email}">
***<xp:this.validators>
<xp:validateConstraint
message="Email address should be in the format: name@someplace.somedomain"
regex="\S+@\S+\.\S">
</xp:validateConstraint>
</xp:this.validators>***
</xp:inputText>
</xp:td>
</xp:tr>
</xp:table>
<xp:button id="button3" value="Save">
<xp:eventHandler
event="onclick"
submit="true"
refreshMode="complete"
immediate="false"
save="true">
</xp:eventHandler>
</xp:button>
<xp:button id="button2" value="Cancel">
<xp:eventHandler event="onclick"
submit="true"
refreshMode="complete"
immediate="true"
save="false">
</xp:eventHandler>
</xp:button>
<xp:this.navigationRules>
<xp:navigationRule outcome="xsp-success" viewId="/NameResults.xsp">
</xp:navigationRule>
</xp:this.navigationRules>
<xp:br></xp:br>
</xp:view>