- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 07:50 AM
The variable 'group name' should accept only 'A to Z, a to z, 0 to 9 and _' using client script, I have tried below script but it is not working as expected.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var pattern = new RegExp('^[a-zA-Z0-9,_]*$');
var result = pattern.test(newValue);
if(!result ){
alert('Input is invaild');
g_form.setValue("group_name", '');
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 08:01 AM
Hi @Archana23,
No need to use a client script for this:
You can use the OOTB Regex validation:
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 08:01 AM
Hi @Archana23,
No need to use a client script for this:
You can use the OOTB Regex validation:
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.