Using Pattern Comparison as a Validator

Using Pattern Comparison as a Validator

Overview of Validator Column configuration screen

Pattern Comparison allows the Bamboo Validator Column to compare a value entered by a user with either a pre-defined pattern or a custom expression of your own. In addition, you can use and/or logic to require that an entered value matches multiple patterns, or one of several possibilities.

Image of the Validator column configuration screen when the Pattern Comparison check box is selected
The above image has been edited to better represent the configuration options.

NOTE: The following steps require you to have accessed the New Column settings screen and selected Bamboo Validator as the column type.


Select the type of data to be entered into the column from the Column Data Type drop-down menu. The available choices are:

  • Single Line of Text

  • Number

  • Currency

  • Date and Time

NOTE: Additional formatting options may appear in the configuration screen based on your selection.

2. Check the Pattern Comparison check box to expose the pattern comparison configuration options.

Select Pre-defined pattern to validate user entries against the following options:

  • Phone Number (German & US)

  • Postal/Zip Code (German & US)

  • US Currency

  • Email Address

  • Internet URL

  • Password (6-20 characters, 1 letter and 1 number)

  • IP Address

  • Social Security Number

  • Number

NOTE: The options above are associated with the Single Line of Text column data types. The available choices will differ based on the currently assigned Column Data Type.


To create a custom pattern, select Enter regular expression and define the desired expression in the field to the right.
A detailed explanation regarding how to create an expression can be found in this MSDN article.

NOTE: Regular expression is the only Pattern Comparison available if Date and Time is selected as your column type.

4. Select the Add Another button to add second pattern using the desired logic operator (And/Or).
5. Enter a required message in the Validation message field that will be displayed when an entered value is determined to be invalid.