diff options
author | 2024-11-21 12:13:55 +0100 | |
---|---|---|
committer | 2024-11-21 12:13:55 +0100 | |
commit | c2029df9bcfa05c19cf3644f2e686da35e267c68 (patch) | |
tree | 0b21c0bca8cc25743b2679ed5f026ed0afafd16f /internal/validate/formvalidation.go | |
parent | [chore] Bump cross-spawn from 7.0.3 to 7.0.6 in /web/source (#3552) (diff) | |
download | gotosocial-c2029df9bcfa05c19cf3644f2e686da35e267c68.tar.xz |
[feature] Allow emoji shortcode to be 1-character length (#3556)
* [feature] Allow emoji shortcode to be 1-character length
* testerino fixeroni
* spaghet
Diffstat (limited to 'internal/validate/formvalidation.go')
-rw-r--r-- | internal/validate/formvalidation.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/validate/formvalidation.go b/internal/validate/formvalidation.go index e8ec3380b..207e8e05e 100644 --- a/internal/validate/formvalidation.go +++ b/internal/validate/formvalidation.go @@ -190,11 +190,11 @@ func CustomCSS(customCSS string) error { } // EmojiShortcode just runs the given shortcode through the regular expression -// for emoji shortcodes, to figure out whether it's a valid shortcode, ie., 2-30 characters, +// for emoji shortcodes, to figure out whether it's a valid shortcode, ie., 1-30 characters, // a-zA-Z, numbers, and underscores. func EmojiShortcode(shortcode string) error { if !regexes.EmojiValidator.MatchString(shortcode) { - return fmt.Errorf("shortcode %s did not pass validation, must be between 2 and 30 characters, letters, numbers, and underscores only", shortcode) + return fmt.Errorf("shortcode %s did not pass validation, must be between 1 and 30 characters, letters, numbers, and underscores only", shortcode) } return nil } |