Version Affected: All
Overview
This article explains how to use a regular expression (regex) to restrict what users can submit in a field on the employee Self Service page — for example, to prevent users from entering an email address from a specific domain.
Restrict a Self Service Field with a Regular Expression
- In the realm's Workflow tab, expand the Self Service section. Each field listed here has its own Regular Expression box.
- In the Regular Expression box for the field you want to restrict, enter a regex that matches the values you want to disallow. For example, to prevent users from entering a gmail.com email address in the Email 1 field, enter ^((?!@gmail.com).)*$.
Once the regex is saved, a user who tries to enter a disallowed value sees an error:
Other values are accepted normally:
Special Considerations
Writing a regular expression is outside the scope of this article. Test any pattern carefully before applying it to a production environment.
SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.
Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.
Comments
Please sign in to leave a comment.