Normalizing employee information across an organization is one of the many benefits of adopting Directory. It is not uncommon for third-party applications to rely on Active Directory for employee information in a specific format.
Using Directory, Regular Expression patterns can be applied to attributes by setting up a custom format from Hyperfish Settings -> Attributes.
Step 1
Navigate to Settings -> Attributes, and click the 'Edit' button for the attribute you wish to configure.
Step 2
Click the 'Validation' tab, and make sure 'Text Input' is selected as the render type. A 'Pattern' field will emerge, allowing for the input of a regular expression pattern:
Here are some patterns to get started with:
Example | Regular Expression Pattern | |
North American Number Pattern - Hyphen Separated, with area code | 123-456-7890 | ^[2-9]\d{2}-\d{3}-\d{4}$ |
North American Number Pattern - with area code, accepts dashes, dots, and spaces as separators | (123) 456-7890, 123-4567, 123.456.7890 | ^\(\d{3}\)\s?|\d{3}(\.|-|\s)?)\d{3}(\.|-|\s)?\d{4}$ |
UK Phone Number - with international option | +44 (0)1234 567890, 01234-567890 | ^\s*\(?((\+0?44)?\)?[ \-]?(\(0\))|0)((20[7,8]{1}\)?[ \-]?[1-9]{1}[0-9]{2}[ \-]?[0-9]{4})|([1-8]{1}[0-9]{3}\)?[ \-]?[1-9]{1}[0-9]{2}[ \-]?[0-9]{3}))\s*$ |
UK Mobile Phone Number | +44 7123 456 789, 07123 456789 | ^(\+44\s?7\d{3}|\(?07\d{3}\)?)\s?\d{3}\s?\d{3}$ |
PA,OH,MI, License Plates (e.g. for employee parking) | ABC 1234, DEF 5678 | ^[A-Z]{3}(\s)?[0-9]{4}$ |
More examples and other RegEx tools can be found at RegExLib.com.
Step 3
After applying your new format, the corresponding attribute field in the Directory Profile Update page will validate using the specified RegEx pattern:
Comments
0 comments
Please sign in to leave a comment.