Imput mask so that entry must include "32characters#4numbers"

Started by Jelle Mees, January 20, 2020, 03:05:22 PM

Previous topic - Next topic

Jelle Mees

In our clan, we only want members that have Discord.
A discord ID contains a # so I want the input to contain at least the symbol #.
Not only would it avoid applications that we need to decline, but it would also be a great spam-account filter.

This is an example of a valid entry:
TestingTwitch#0001

So always max32characters#4numbers


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Jelle Mees

That didn't work.

I tried this and it does seem to work:

/.+#\d{4}$/

Now people have to enter "blablabla#1234" but they can still extend the first part beyond 32 characters. I guess it's fine that way.

Advertisement: