From afa2f6880489501b8c4465f66ef9ceb981b26946 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 12 Jul 2022 20:28:07 +0200 Subject: [PATCH] change pronouns required format from 1-5 to 2-5 --- files/helpers/regex.py | 2 +- files/routes/settings.py | 2 +- files/templates/settings_profile.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 5dc8dff84..2c70b9ef2 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -102,7 +102,7 @@ search_token_regex = re.compile('"([^"]*)"|(\S+)', flags=re.A) git_regex = re.compile("ref: (refs/.+)", flags=re.A) -pronouns_regex = re.compile("[a-z]{1,5}/[a-z]{1,5}", flags=re.A) +pronouns_regex = re.compile("[a-z]{2,5}/[a-z]{2,5}", flags=re.A) def sub_matcher(match, upper=False): if match.group(0).startswith('<'): diff --git a/files/routes/settings.py b/files/routes/settings.py index f3fe6572c..c364f4b9c 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -892,7 +892,7 @@ def settings_pronouns_change(v): return render_template("settings_profile.html", v=v, error="You didn't change anything") if not pronouns_regex.fullmatch(pronouns): - return render_template("settings_profile.html", v=v, error="The pronouns you entered don't match the required format {1-5 characters}/{1-5 characters}") + return render_template("settings_profile.html", v=v, error="The pronouns you entered don't match the required format {2-5 characters}/{2-5 characters}") v.pronouns = pronouns g.db.add(v) diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index e40c0dc9f..a3fb165cf 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -466,9 +466,9 @@
- +
- {1-5 characters} / {1-5 characters} + {2-5 characters} / {2-5 characters}