fix alias regex: allow only alphanum as the first char

This commit is contained in:
or-else
2025-05-06 10:43:59 +03:00
parent 7d627edfce
commit 8288ad4733
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ const messages = defineMessages({
}
});
const ALIAS_REGEX = /^[a-z0-9_\-]{4,24}$/;
const ALIAS_REGEX = /^[a-z0-9][a-z0-9_\-]{3,23}$/i; // 4-24 characters, starting with letter or digit, then letters, digits, hyphen, underscore.
const ALIAS_AVAILABILITY_CHECK_DELAY = 1000; // milliseconds
class TopicDescEdit extends React.Component {