Skip to main content
Nintex Community Menu Bar

Topic

If there is a requirement  to enforce formatting or prevent special characters in a form control, leveraging Regular Expression may be the most efficient option.

 

Instructions

  1. Select the control.
  2. Open “Control settings”.
  3. Go to the "Validation" group.
  4. Set "Use Regular Expression" to 'Yes'.
  5. Enter the desired expression
For example:
Prevent Special Characters (Allow alphanumeric characters only)
w+

Email Address Format:
^tA-Za-z0-9]((-_.-]?(a-zA-Z0-9]+)*)@(9A-Za-z0-9]+)((0.-]?)a-zA-Z0-9]+)*).(9A-Za-z]{2,})$

 

 

Additional Information

Configuring validation within the control settings is the only way to leverage Regular Expression for validation at runtime in a Nintex Form. Using a Validation Rule with runtime functions will not properly evaluate Regular Expression. For example, using the contains() function to attempt to prevent special characters only evaluates literal strings rather than Regular Expressions.

 

Related Links

Microsoft - Regular Expression Language - Quick Reference
Regular Expression Language - Quick Reference

 

Be the first to reply!

Reply