cogdog is seeking suggestions to validate custom user field input for Fediverse handles in the format @username@instance.name. Despite clear instructions, many users are entering invalid formats, such as email addresses, Twitter usernames, and random strings. Heliosurge suggested using the Discourse Authentication Validations plugin, which cogdog found useful. Additionally, Heliosurge recommended the User Field Prompt theme component to help correct invalid entries by providing format details and pictures.
We’ve been encouraging people in our education community to include in their profile a username if they have a fediverse account (Mastodon, Bluesky, Threads, et al). These should be something with two @ signs, where the first is a username and the second a valid formatted domain.
@coolperson99@someinstance.org
Despite what I thought was a clearly explained format:
The successful entry rate is like 20% or worse. I get email addresses, twitter usernames, random strings, URLs. I can only dream, but think it should be possible to check with some regex (again my skills are mid range to muddling) for the valid format.
Thanks Dan, the Discourse Authentication Validations plugin looks perfect and useful for my other fields.
I am already using Clickable Social Icon Links. I can see my mistake was asking for a mastodon username rather than a URL, so it looks like I have some cleanup to do!