- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 11:43 PM
Hi,
I don't want to let you enter certain numbers.
Example) Allow the input of numbers other than 1-10.
Can I define a range specification in client processing?
Regards,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2022 06:17 PM
so you want to allow numbers from 151? In that case you dont need regex. Regex is used to validate formats.
You can use client script for this
var x = g_form.getValue('fieldname');
if ( x >100 || x <= 150)
{
alert("Numbers cannot be between 100 and 150);
}
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2022 12:17 AM
Hi,
You can define a regular expression that allows for entering specific patterns.
For example, this will allow for entering 2 or more digits in a string.
var regex = /^[\d]{2,}$/;
var testString = '234';
if (test1.match(regex))
g_form.addInfoMessage('success on ' + testString);
else
g_form.addErrorMessage(testString + ' does not match the pattern');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2022 03:50 AM
Hi,
Thank you.
What does this phrase mean? How can I write code when I don't want to let a number between "100-150" be entered?
Regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2022 09:17 AM
Regular expression is used to validate what you should enter.
Can you explain what you mean by "100-150 not allowed"?
Are numbers 1-99 allowed? Are numbers 151 and higher allowed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2022 06:52 PM
Hi,
Thank you.
As you say, 1-99 is a requirement that permission be granted, and the number of section 151 is also permitted.
Regards,