- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 01:10 AM
I am trying to prevent any spaces on a variable and set up a regex for this and it's not working
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 02:58 AM
Hi Zhane,
I would recommend changing your regex to ^\S+$
Have you added the regex to the variable itself? (Note:It will only work on particular variable types)
There is a field on the variable that needs to be set to your new regex record - Validation regex (you may need to add this to the form layout)
I created the updated regex (^\S+$) in my own instance and it works after I added it to a single line text variable
Hope this helps,
Shane

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 02:58 AM
Hi Zhane,
I would recommend changing your regex to ^\S+$
Have you added the regex to the variable itself? (Note:It will only work on particular variable types)
There is a field on the variable that needs to be set to your new regex record - Validation regex (you may need to add this to the form layout)
I created the updated regex (^\S+$) in my own instance and it works after I added it to a single line text variable
Hope this helps,
Shane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 03:04 AM