The number type type filed should only allows numeric value in Record producer variable?

Deepika61
Tera Contributor

Hi All,

Actually in Record Producer , i have some number type variables, i have given type as single line text, So my requirement was those variables should only allow numeric value, ?

Is there any possible to only one client script for all the variables to validate?

 

Please help me on this 

Thanks

Deepika

1 ACCEPTED SOLUTION

You might need to add the field to the form. It's OOTB Platform functionality, which is available for everyone.

 

PeterBodelier_0-1696489413027.png

 


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

View solution in original post

5 REPLIES 5

Peter Bodelier
Giga Sage

Hi @Deepika61,

 

On the type specifications tab of the variable, you can select which regex to validate. You can select Number there, to validate if only numbers are entered.

 


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Hi @Peter Bodelier 

Thanks for the response, but no luck, i was look for that but , its not available for me

Hi @Deepika61 

You can try for regular expressions "/^\d+$/" or you use isNaN() function in your client script to check for numbers

You might need to add the field to the form. It's OOTB Platform functionality, which is available for everyone.

 

PeterBodelier_0-1696489413027.png

 


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.