Validating input in fax and email templates > Configuring input validation and error messages

Configuring input validation and error messages
To configure input validation, you use regular expression patterns (regexp). For information about the regexp syntax, please refer to documentation of java.util.regexp.Pattern.
To implement configured input validation, you must restart the Java application server.
To configure input validation
You configure input validation in the following files:
document-fax.xml – Fax template configuration.
document-email.xml – Email template configuration.
When running Apache Tomcat, the default installation directory for the files is:
<Tomcat_inst_dir>\webapps\<portal name>\WEB-INF\settings
To configure error messages
In the application-texts.xml file, you configure error messages that are displayed when incorrect characters are entered in the fields.
When running Apache Tomcat, the default installation directory for this file is:
<Tomcat_inst_dir>\webapps\<portal name>\WEB-INF\i18n
Example 4
In this example, input validation is configured for the fax number field in the document-fax.xml file:
<setting name="faxNumber" id="8E1506E2-E95F-4076-B274-A958342F8C16" format="string" regexp="[+]{0,1}[0-9]+" message="web.forms.validation.string.regexp.faxnumber" /> 
In the application-texts.xml file the corresponding error message is configured:
<message key="web.forms.validation.string.regexp.faxnumber">Use number format like +4631265000 or 004631265000</message> 
In the fax template, users can enter the + character and characters within the interval 0-9. The + character can occur once or not at all ({0,1}) and can be followed by any number of digits ([0-9]+).
If any other character is entered, for example a letter, the following message is displayed to the user: Use number format like +4631265000 or 004631265000
 
OpenText StreamServe 5.6 Updated: 2013-03-01