Regexp Patterns for Modal Input Fields #5552
Unanswered
Walledgarden
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
👋 Hey there!
I'm recently creating an app which has a function, which allows users to build embeds using Select Menus and Modals (An embed preview with a select menu with the editable options). While doing that, I realized, that it would be very helpful if I could register Slash Commands and their Options with a Regex Field, which should allow us, to show a customized error message, if the Regex isn't met (either via a gateway event or hard-coded in the Slash Command Registration process). For example, this functionality would make it easier, to check if users follow a certain pattern for color codes (
/^\#[\dA-Fa-f]{6}$/
) and avoid the needless step, to show an ephemeral error and opening the embed again with being required to fill in the values again.I strongly believe, that there are a lot of other use cases for this feature, feel free to comment them below!
Thanks for reading though, I'd love to hear your opinion about this!
Beta Was this translation helpful? Give feedback.
All reactions