Phone number validation | Community
Skip to main content
Level 2
January 6, 2025
Question

Phone number validation

  • January 6, 2025
  • 1 reply
  • 531 views

We use a phone field to input phone number for our forms which has a SFDC sync, but there doesn't seem to be an easy way to validate the data. We've noticed people being able to put in 1 in the phone number or 123. Just looking to not allow people to put less than 8 numbers in the phone field (but could be more than 8), and only numbers. Is there a way to do this without Javascript? I've seen the instructions on masking but this seems to be only if you want it to be exact 8 not 8 or more.

1 reply

SanfordWhiteman
Level 10
January 6, 2025

You'll need code like in my "More input mask tweaks for Marketo forms" post.

 

Then you can use a mask like 99999999oooo (between 8 and 12 digits).