Forum Discussion

SapnaBhargava's avatar
SapnaBhargava
Community Member
12 days ago

Variable not working for a particular number of digits

I am currently developing a project where users must input their 10-digit mobile number on one page. If they input fewer than 10 digits or more than 10 digits, I would like to display the error message "Kindly enter a 10 digit number," and I have a Next button located below. The Next button should only be enabled if the user enters exactly 10 digits. 

I have tested this scenario with inputs of less than 10 digits, such as 9, 8, 7, and so on, and my triggers are functioning correctly for those cases. However, I am experiencing an issue with the trigger not working for 10 digits. Please let me know what the potential problem might be. 

I have attached a screenshot of my trigger below for a 6 digit number. But if I use the same logic for 10 digits it is not working.

 

 

 

 

  • Storyline internally rounds digits. If you are not using Javascript that might cause it.

  • Nedim's avatar
    Nedim
    Community Member

    Try to validate 2147483647 vs 2147483648. It could be that Storyline use signed 32-bit integer to handle numbers. If you are only comparing values, I suggest using a text entry field combined with JavaScript to allow only numeric input.