fix(usernames): remove more ratzen fratzen dupe strings

This commit is contained in:
Sabe Jones
2018-10-13 21:05:07 -05:00
parent 60b26d4ec0
commit 392b54aa7b
3 changed files with 3 additions and 6 deletions

View File

@@ -79,8 +79,8 @@ async function registerLocal (req, res, { isV3 = false }) {
notEmpty: true,
errorMessage: res.t('missingUsername'),
// TODO use the constants in the error message above
isLength: {options: {min: USERNAME_LENGTH_MIN, max: USERNAME_LENGTH_MAX}, errorMessage: res.t('usernameWrongLength')},
matches: {options: /^[-_a-zA-Z0-9]+$/, errorMessage: res.t('usernameBadCharacters')},
isLength: {options: {min: USERNAME_LENGTH_MIN, max: USERNAME_LENGTH_MAX}, errorMessage: res.t('usernameIssueLength')},
matches: {options: /^[-_a-zA-Z0-9]+$/, errorMessage: res.t('usernameIssueInvalidCharacters')},
},
email: {
notEmpty: true,