Suseela Peddise
Kilo Sage

Hi,

You can use length to determine the number of digits.

Ex: 

var len= g_form.getValue('<<fieldname>>').length;  //replace with variable name

if(len<5)

{

alert('Number should be at least 5 digits in length');
g_form.setValue('<<fieldname>>',''); //replace with variable name

}

else if(len >7) 
{
alert('Number should not exceed 7 digits in length');
g_form.setValue('<<fieldname>>',''); //replace with variable name

}

 

If I have answered your question, please mark my response as correct and/or helpful.

Thanks,

Suseela P.