Skip over navigation

RXML Code

Validation code example

<!-- form-mode:validate -->

<if variable="var.form-mode = validate">
<if variable="form.phone = 867-5309">
<set variable="var.form-invalid"/>
<set variable="var.form-invalid-phone"/>
</if>
</if>

Another validation code example

<!-- form-mode:validate -->

<if variable="var.form-mode = validate">
<if variable="form.phone = *(*">
<set variable="var.form-invalid"/>
<set variable="var.form-invalid-phone"/>
</if>
</if>

Example that limits the character length on an email field

<!-- form-mode:validate -->

<if variable="var.form-mode = validate">
<set variable="var.email-length"><strlen>&form.email;</strlen></set>
<if variable="var.email-length > 64">
<set variable="var.form-invalid"/>
<set variable="var.form-invalid-email"/>
</if>
</if>