How to use Input Mask to restrict a 10-digit phone number?

  • Profile Image
    jrobgk1
    Asked on June 22, 2017 at 06:01 PM

    We have a phone number field, and don't want people to be able to only enter 7 or 8 digits instead of 10. Can we trap for that before submission to our system?

    Jesse

  • Profile Image
    Jim_R
    Answered on June 22, 2017 at 06:53 PM

    Hey Jesse, you may use Input Masks to achieve this.

    @ = Masks Letters

    # = Masks Numbers

    * = Masks Letters & Numbers

    Since you're asking for a 10-digit phone number, use a Short Text Entry (Textbox) field and set its Input Mask like this: ##########

    Complete guide: Getting-Started-with-the-Basics-of-Input-Masking 

    (On the guide above, scroll down to Scenario #2 for a couple of examples with phone numbers)