# Only accept starting with 8 no dashes or dots or spaces

**URL:** https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623
**Category:** Ask for Help
**Created:** [May 11, 2021, 4:04am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623 "2021-05-11T04:04:27Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 11, 2021, 4:04am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/1 "2021-05-11T04:04:27Z")

</div>

1st I have to thx u all of community. today my app shows in the biggest Tv cia of latam TV Globo and people is using the app that a developed with help of this community. I’m too happy!

Now I need to fix sth.  
The main input is a text like a hash with 44 or 48 numbers that it´s a id of bills.

The type of bills that my project helps,the code has to begin with 8 and people cant insert dot, dashes or spaces. how can I assure that? Otherwise the user cant insert the record/row.

Today I accept and fix in the Google but I’m receiving many things, texts, msgs…code with dots, spaces …so forth.

Pls help me!

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [May 11, 2021, 4:34am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/2 "2021-05-11T04:34:34Z")

</div>

Just trying to understand…

- Your users manually enter this code?
- or, your app needs to generate the code for them?
- if the app is generating the code, does it need to be unique?
- if your users are entering it, do you need to validate it against a known list of codes?
- You say “no dashes, dots or spaces”. Are they the only invalid characters?
- What about `~&$°£º™Q`? Would that be valid? - it doesn’t contain any dashes, dots or spaces 😉
- Maybe better to try and define the set of _acceptable_ characters, rather than the unacceptable ones?

---

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 11, 2021, 5:31am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/3 "2021-05-11T05:31:02Z")

</div>

Darren I have to thk u first of all. u helped me a lot.  
Let´s go!

- Your users manually enter this code? they can enter or I’m testing code bar reader. our light bills for instance comes with code bar and this long code like hash. like this  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/0/40d40db49c6283fd092a0ea1a019f1eeb04e6124.png)  
suppose that it´s your bill I need the code 8363…to pay for u in my internet banking.

- or, your app needs to generate the code for them? not generate. the code comes in the bill.

- if the app is generating the code, does it need to be unique? no.

- if your users are entering it, do you need to validate it against a known list of codes? although each digit has a rule, in the first moment I only need to check if begins with 8.

- You say “no dashes, dots or spaces”. Are they the only invalid characters? although as u can see the code comes with special char, let´s say, when people will pay they will need to type each digit or past if the codes comes like hash 8363…all together.

- What about `~&$°£º™Q` ? Would that be valid? - it doesn’t contain any dashes, dots or spaces 😉 no, no only numbers!

- Maybe better to try and define the set of _acceptable_ characters, rather than the unacceptable ones? only numbers. all I need is to check if it begins with 8 and there are no dot, spaces any other one only numbers. got it?

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [May 11, 2021, 5:40am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/4 "2021-05-11T05:40:18Z")

</div>

you can scan this code in Glide, no need to manually enter  
also when they enter manually … you can show warning if contain characters that you don’t allow or substitute them with “” empty

---

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 11, 2021, 5:46am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/5 "2021-05-11T05:46:17Z")

</div>

Thx Uzo! I discovered the scan code a few days ago. I’m intermediate let´s say…so I use to come here to learning. i.e. I don’t know how to show input text and only fill using scan code not enter manually. But I will test. Thx again.

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [May 11, 2021, 5:51am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/6 "2021-05-11T05:51:15Z")

</div>

open a column for scanned code, when user will scan the code it will go there.  
add component text entry, assign it to that column … users can insert manually

---

<div class="post-metadata">

### Author: ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)
#### Post date: [May 11, 2021, 6:11am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/7 "2021-05-11T06:11:52Z")

</div>

Hi @Alexandre_Caruso

Just be aware there is a limit on the number of bar code scans on a pro subscription - 1000

I wouldn’t want you to develop your app with this feature if it is not going to provide you with the amount of scans your users may need. 👍

Just saying 😉

> [@selfie Scan Linear Barcode LIVE!](https://community.glideapps.com/t/scan-linear-barcode-live/25817):
>

---

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 12, 2021, 10:59am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/8 "2021-05-12T10:59:59Z")

</div>

thx Rose. The scan code is not a big issue for me. what I need is to enter only 44 ou 48 digits only. how can I do it?

---

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 14, 2021, 8:13pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/9 "2021-05-14T20:13:01Z")

</div>

I solved temporaly using template, replace spaces, dots, with nothing. but I still need to check/aprove to save only is the first digit of this code starts with “8” otherwise I cant accept to continue.

any tip?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [May 14, 2021, 8:40pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/10 "2021-05-14T20:40:17Z")

</div>

If I’m understanding correctly, you want to check if the first digit is an ‘8’? To do that, I would first create a template column that joins ‘@’ to the code. Then create an IF column that checks if that template includes ‘@8’. If it does, then it’s true that the first digit is an ‘8’.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [May 14, 2021, 11:28pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/11 "2021-05-14T23:28:52Z")

</div>

This is genius.

---

<div class="post-metadata">

### Author: ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)
#### Post date: [May 15, 2021, 12:56am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/12 "2021-05-15T00:56:00Z")

</div>

Holy moly

---

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 15, 2021, 3:06am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/13 "2021-05-15T03:06:07Z")

</div>

It´s truth! Genius!  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c34fb6f394caea88a30898b066efe73aabdb7ce2.png)

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [May 15, 2021, 4:56am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/14 "2021-05-15T04:56:39Z")

</div>

this kind of solutions were only available tools back in 80’s when using assembler and pure machine codes… this is how i grow up 😉

---

<div class="post-metadata">

### Author: ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)
#### Post date: [May 15, 2021, 6:54pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/15 "2021-05-15T18:54:13Z")

</div>

what about counting the number of digits? I´d like to validate if this hash ( I call lovely) the code of bill is entered has 48 digits. any tip? thx

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [May 15, 2021, 7:11pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/16 "2021-05-15T19:11:56Z")

</div>

To validate the number length (always =48), you need to use a text column first (Glide will check it and notify an error message if length isn’t 48).  
Later and internally, you can convert that text input to a number.

Saludos Alex

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [May 15, 2021, 7:29pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/17 "2021-05-15T19:29:23Z")

</div>

If it’s a number, you should be able to count the the number of digits after the fact with some math.

You can see an example below. The only difference is that since you already have numbers, there shouldn’t be a need to convert to all 1’s to make it work. I’m not sure though if such a large number would calculate properly, so no guarantee that it would work. This is of course if you need a count after the data has been input and saved to the table. If you need it in a form, then @gvalero’s idea is probably better.

> [@Filter visibility by Character Count!](https://community.glideapps.com/t/filter-visibility-by-character-count/20867/4):
>
> I think I got something here. Not the cleanest solution, but not too bad either. Just takes a little math. Here you can see that column 11 has two rows with text in it. New Column L has a template with the value of 1 in it. New Column J is a template that replaces every letter (and space if you choose) with the number ‘1’. You shouldn’t need to replace any numbers as they are already numbers, but you will probably have to include every letter of the alphabet along with any symbols you would…

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [May 15, 2021, 8:08pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/18 "2021-05-15T20:08:13Z")

</div>

Right.

The best option to do it is using a Form and let Glide validates if all data is complete.

---

<div class="post-metadata">

### Author: ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)
#### Post date: [May 16, 2021, 5:20am UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/19 "2021-05-16T05:20:16Z")

</div>

That’s amazing solution.

---

<div class="post-metadata">

### Author: ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)
#### Post date: [January 17, 2024, 4:52pm UTC](https://community.glideapps.com/t/only-accept-starting-with-8-no-dashes-or-dots-or-spaces/26623/20 "2024-01-17T16:52:08Z")

</div>


