How do I validate phone numbers on form submissions?

Last updated: April 5, 2018


You can validate phone numbers on form submissions by restricting the length of the number a user is able to enter.

Please note: number length restriction is only possible using the default Phone Number property.

  • Navigate to your forms:
    • In your HubSpot Marketing Hub Basic, Professional, or Enterprise account, navigate to Contacts > Forms.
    • In your HubSpot CRM or Marketing Hub Starter account, navigate to Lead Capture Forms.
  • Click the form name to edit.
  • Hover over the Phone Number field, then click Edit.
  • On the left hand side, scroll down to Set limits on the length of number accepted.
  • Input a Minimum and Maximum number length limit. If a user inputs a phone number that does not meet these restrictions, they will be prevented from submitting the form.
  • Click Save at the upper right to save your changes in the form editor, and Publish to take them live on the form.

The Phone Number field only accepts numbers and the following characters that are commonly found in phone numbers: + - ( ) . and x

Please note: these changes apply only to the specific form you are editing. Each form needs to be configured separately for number length restrictions.

Was this article helpful?

If you still need help you can get answers from the , or to contact support.