Conferma uses Regular Expressions to ensure that only data matching certain formats is permitted.
This is used for custom data fields to ensure consistency of data.
Regular Expressions are built from pattern-matching strings. Some common examples can be found below:
-
Numbers only \d
-
Letters or numbers [a-zA-Z0-9]
-
Letters only [a-zA-Z]
-
Fixed characters [abc]
-
To enforce a fixed length string, use any of the above regular expressions followed by the required length in curly brackets. For instance, if you want the custom data field to contain numbers only and comprise a maximum of four characters in length, you would use the RegEx \d{4}
-
A combination of the regular expressions above can be used by stringing together the expressions. For instance, to make a Custom Data Field to conform to four numbers followed by one letter, you would use the RegEx \d{4}[A-Z]{1}