Defining regular expressions in datatypes XML file

You can define the regular expressions for input validation in the datatypes.xml file.

It is recommended that you define those regular expressions in the datatypes.xml file, which are being used for a single datatype and are not being used for multiple datatypes at the same time. Otherwise, if you define regular expression for individual data types you want to use the same regular expression in multiple data types, then making a change to such regular expression may become cumbersome because you will have to make the similar change at multiple places manually. You can define regular expression for input validation in the datatypes.xml file in the following format:
<DataType Name="Address" Size="70" Type="NVARCHAR">
   <UIType Size="30" UITableSize="30"/>
   <Validation>
      <Regex MaxLength="200" JavaPattern="^[a-zA-Z4-9.@\-\/+=_()
             \{\}\[\],:&apos;&quot;]*$" JSPattern=""/>
   </Validation> 
</DataType>
Note: You can externalize the regular expressions defined in the datatypes.xml file into a separate XML file and then use reference of these regular expressions in multiple datatypes.