# Data entry mask on phone or email component?

**URL:** <https://community.glideapps.com/t/data-entry-mask-on-phone-or-email-component/6746>\
**Category:** Ask for Help\
**Created:** [April 10, 2020, 3:16pm UTC](https://community.glideapps.com/t/data-entry-mask-on-phone-or-email-component/6746 "2020-04-10T15:16:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kiptoo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kiptoo/32/57036_2.png) [@kiptoo](https://community.glideapps.com/u/kiptoo)\
**Post date:** [April 22, 2023, 7:46am UTC](https://community.glideapps.com/t/data-entry-mask-on-phone-or-email-component/6746/3 "2023-04-22T07:46:22Z")

</div>

FWIW, I have this workaround that uses a combination of regex (generated with the help of ChatGPT) and Glide text hints to inform the user what a valid format should look like:

1. [Data Editor] Create a column in the Customers data sheet, e.g. `Phone Number Valid`, of this type: Other ➝ Experimental ➝ Text ➝ Check Text Matches. Set the column to your regex pattern, e.g `^\+(?:[0-9] ?){6,14}[0-9](?: ?[0-9]){0,10}$`  

2. [Layout] Create a text hint component to display the error/warning message, and tie its visibility condition to the value of the column from step 1  

Some potential downsides of this workaround:

- It’s [difficult to come up with a catch-all regex](https://stackoverflow.com/q/2113908/1145905) pattern, since international number formats vary by country/region. However, if the expected values are restricted to a particular region, then it’s easier to apply a stricter regex
- There’s [seemingly no way](https://community.glideapps.com/t/enable-disable-controls/20007) (?) to disable the “Submit” button on the standard Glide form when the validation fails. Most of the related questions I came across are about custom buttons (but ofc, I stand guided):
  - [Disable a Button](https://community.glideapps.com/t/disable-a-button/31772)
  - [Enable/Disable Controls](https://community.glideapps.com/t/enable-disable-controls/20007)
  - [How to disable button](https://community.glideapps.com/t/how-to-disable-button/32145)

---

_[View the full topic](https://community.glideapps.com/t/data-entry-mask-on-phone-or-email-component/6746)._
