Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 11:16 PM
Hi Team,
We have a requirement to have a text field variable that doesn't allow more than 10 digits and also no repetitive numbers. Request you to please help in providing the client script for this.
Thanks in advance,
Abhishek
Solved! Go to Solution.
Labels:
- Labels:
-
Scripting and Coding
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 11:57 PM
Hi,
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var reg = /^(?:(.)(?!\1{9}))\d{9}$/;
var ans = g_form.getValue('time_field'); //replace time_field with variable/field name
if (!reg.test(ans)) {
alert('Please enter valid non-repititive digits & 10 digits');
}
}
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 11:57 PM
Hi,
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var reg = /^(?:(.)(?!\1{9}))\d{9}$/;
var ans = g_form.getValue('time_field'); //replace time_field with variable/field name
if (!reg.test(ans)) {
alert('Please enter valid non-repititive digits & 10 digits');
}
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 12:00 AM
Thanks for the help 🙂