Advertisement:

Author Topic: Profile Field Input Mask (Regex)  (Read 7134 times)

Offline RetributionZA

  • Newbie
  • *
  • Posts: 3
Profile Field Input Mask (Regex)
« on: October 28, 2018, 06:11:07 AM »
im strugging with the input mask under  Administration Center »Features and Options » Profile Fields

im trying to get it that a user must enter their discord name followed by a # and then the 4 numbers  e.g. (Discord#1234)

last 4 numbers including the hash must be compulsory but the discord name can be any length


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,994
    • StoryBB/StoryBB on GitHub
Re: Profile Field Input Mask (Regex)
« Reply #1 on: October 28, 2018, 07:49:34 AM »
Code: [Select]
/.+#\d{4}$/
Not tested but I think it should work.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline RetributionZA

  • Newbie
  • *
  • Posts: 3
Re: Profile Field Input Mask (Regex)
« Reply #2 on: October 28, 2018, 09:11:00 AM »
awesome thank, will test and get back to you !  :)

Offline RetributionZA

  • Newbie
  • *
  • Posts: 3
Re: Profile Field Input Mask (Regex)
« Reply #3 on: October 28, 2018, 02:20:35 PM »
tested and seems to be working fine