# Check for rude names?!

**URL:** <https://community.glideapps.com/t/check-for-rude-names/36841>\
**Category:** Ask for Help\
**Created:** [January 8, 2022, 8:49am UTC](https://community.glideapps.com/t/check-for-rude-names/36841 "2022-01-08T08:49:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 8, 2022, 8:49am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/1 "2022-01-08T08:49:18Z")

</div>

Do you know of a way to check users do not adopt a rude user name?

> **[WORDL](https://wordl.glideapp.io/)**
>
> 6 chances to guess the 5 letter word

In my WORDL app, people enter a user name. Inevitably, there appears someone that enters a profanity. In this case, I would like to hide a button that completes the sign-in.

It’s straightforward to check for perfect matches. But I would prefer a safer solution, which scans the name to see if it contains a banned text (vs. 1:1 exact match).

AAA = AAA is quite straightforward  
**AAA** contains AAA is the challenge

My app doesn’t use a Google sheet or Excel sheet, it only uses Glide tables.

Thanks in advance for any pointers.

Simon.

---

<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:** [January 8, 2022, 8:56am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/2 "2022-01-08T08:56:25Z")

</div>

Maybe you can:

- Split the name by space character
- Have a separate table of banned words
- Use a relation to relate the array in 1st step to the column of banned words
- If the relation is not empty don’t allow submitting

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 8, 2022, 9:12am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/3 "2022-01-08T09:12:58Z")

</div>

Thanks but I believe this only finds whole matches. For example, if the user name is Banger and you want to block names containing bang, the relation fails. It works if the user name is Bang, but not if there is some extra text…

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 8, 2022, 9:26am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/4 "2022-01-08T09:26:25Z")

</div>

Ah I think I found a solution!

I use a template column and start with the Username. I can then replace rude words the character ‘!’. Then it’s a simple step to check to see if the template column has made a change…

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/4/043aace8615c4e604b65aed9ee62e369443ebd96.png)

(one extra step needed since the check is case sensitive: convert the name into lowercase using ‘Lowercase Text column’ and use this as the username reference in the template column)

---

<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:** [January 8, 2022, 9:39am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/5 "2022-01-08T09:39:27Z")

</div>

Here is a JS option:

 ![Screen Shot 2022-01-08 at 5.37.31 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/9/49361eb4189d66c215b9e8ec7dc153bb5fcd3080.png)

 ![Screen Shot 2022-01-08 at 5.37.44 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/7/171ae29f8d282bb216267696fe7356c2139a3c92.png)

```auto
var words = p2.split(',');
p1 = p1.toLowerCase();
for (var word in words) {
  if (p1.match(words[word])) {
    return 'Oops!';
  }
}

```

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 8, 2022, 9:41am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/6 "2022-01-08T09:41:00Z")

</div>

Nice - but on this occasion the no code option is my preferred option 🙂

---

<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:** [January 8, 2022, 9:41am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/7 "2022-01-08T09:41:43Z")

</div>

Yes, it would be mine also. I just did that for a bit of fun.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 9, 2022, 9:41am UTC](https://community.glideapps.com/t/check-for-rude-names/36841/8 "2022-01-09T09:41:53Z")

</div>

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