Need a regex to allow all characters and spaces, but no lower case letters. Valid length is 0 - 60.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 03:39 PM
Need a regex to allow all characters and spaces, but no lower case letters. Valid length is 0 - 60 characters.
I want to use this in a multiline variable called "item_short_description".
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 07:10 AM - edited 03-19-2024 07:13 AM
Hi @Joe Taylor in regex A-Z refers all characters between A to Z in all capital letters /s refers to spaces 0 to 60 allows upto 60 characters
You can write a on change client script like below
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var pattern = /^[A-Z\s]{0,60}$/;
if (!pattern.test(newValue)) {
g_form.clearValue('variablename');
g_form.showFieldMsg('variablename', 'Error message here ', 'error');
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 07:52 AM
Thanks for the script.
But I need all other characters: !@#$%^&, etc.
I was really hoping I could put in a NOT rules like [!a-z] and be done with it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 06:17 PM
Hi @Joe Taylor got it you want to allow all special characters, in that case below script works. Kindly check.
Negative Test:
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 07:09 AM
Hi @Joe Taylor if your issue is resolved please accept the solution 🙂
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 10:28 PM