Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: RetributionZA on October 28, 2018, 06:11:07 AM

Title: Profile Field Input Mask (Regex)
Post by: RetributionZA 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

Title: Re: Profile Field Input Mask (Regex)
Post by: Arantor on October 28, 2018, 07:49:34 AM
/.+#\d{4}$/

Not tested but I think it should work.
Title: Re: Profile Field Input Mask (Regex)
Post by: RetributionZA on October 28, 2018, 09:11:00 AM
awesome thank, will test and get back to you !  :)
Title: Re: Profile Field Input Mask (Regex)
Post by: RetributionZA on October 28, 2018, 02:20:35 PM
tested and seems to be working fine