mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] allow usernames of length 1 (#1823)
Closes https://github.com/superseriousbusiness/gotosocial/issues/1691. Co-authored-by: decentral1se <cellarspoon@riseup.net>
This commit is contained in:
@ -93,6 +93,7 @@ func (suite *ValidationTestSuite) TestValidateUsername() {
|
||||
trailingSpace := "thisusername_ends_with_a_space "
|
||||
newlines := "this_is\n_almost_ok"
|
||||
goodUsername := "this_is_a_good_username"
|
||||
singleChar := "s"
|
||||
var err error
|
||||
|
||||
err = validate.Username(empty)
|
||||
@ -118,6 +119,9 @@ func (suite *ValidationTestSuite) TestValidateUsername() {
|
||||
|
||||
err = validate.Username(goodUsername)
|
||||
suite.NoError(err)
|
||||
|
||||
err = validate.Username(singleChar)
|
||||
suite.NoError(err)
|
||||
}
|
||||
|
||||
func (suite *ValidationTestSuite) TestValidateEmail() {
|
||||
|
Reference in New Issue
Block a user