# How to validate International phone number to disallow letters

**URL:** <https://community.gravityforms.com/t/how-to-validate-international-phone-number-to-disallow-letters/13204>\
**Category:** Get Help\
**Tags:** gform\_field\_validation, phone-validation, phone\
**Created:** [August 10, 2022, 6:40am UTC](https://community.gravityforms.com/t/how-to-validate-international-phone-number-to-disallow-letters/13204 "2022-08-10T06:40:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5b8b7103ede0c0.5](https://avatars.discourse-cdn.com/v4/letter/u/c0e974/32.png) [@user5b8b7103ede0c0.5](https://community.gravityforms.com/u/user5b8b7103ede0c0.5)\
**Post date:** [August 10, 2022, 6:40am UTC](https://community.gravityforms.com/t/how-to-validate-international-phone-number-to-disallow-letters/13204/1 "2022-08-10T06:40:59Z")

</div>

Hi, my form needs to allow for users anywhere in the world to input their phone number, therefore, I cannot use the North American format which includes a numbers-only validation. Why does the International format allow letters? How can we disable letters and allow numbers and symbols only? I’ve read the closed threads on this topic and a masked text input solution does not work for this purpose because we don’t know how many digits international users will require.

Thanks

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [August 10, 2022, 1:58pm UTC](https://community.gravityforms.com/t/how-to-validate-international-phone-number-to-disallow-letters/13204/2 "2022-08-10T13:58:03Z")

</div>

The International phone format is … not great. The product team has an open issue to improve the handling of phone formats.

If you are trying to prevent the user from entering a letter in an international phone field, I don’t have a good solution for you. Gravity Forms does not handle front-end validation (as the user inputs), but that is also on our list of requested features.

You can use the gform\_field\_validation filter to review what the user submitted to you, and return a validation error if they used a character you do not want to allow.

Here is the documentation for gform\_user\_validation:

> **[gform\_field\_validation](https://docs.gravityforms.com/gform_field_validation/)**
>
> Use this filter to create custom validation logic for a field.

If you need assistance with the actual regex for the validation, let us know what symbols you want to allow, in addition to allowing digits. Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [September 9, 2022, 1:58pm UTC](https://community.gravityforms.com/t/how-to-validate-international-phone-number-to-disallow-letters/13204/3 "2022-09-09T13:58:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
