Same error message if username too long
This commit is contained in:
parent
8e28f2539c
commit
95bbccb6f7
@ -291,8 +291,8 @@ router.post(
|
|||||||
if (body.username.length > maxUsername) {
|
if (body.username.length > maxUsername) {
|
||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
username: {
|
username: {
|
||||||
code: "USERNAME_INVALID",
|
code: "BASE_TYPE_BAD_LENGTH",
|
||||||
message: `Username must be less than ${maxUsername} in length`,
|
message: `Must be between 2 and ${maxUsername} in length.`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -155,8 +155,8 @@ router.patch(
|
|||||||
if (check_username.length > maxUsername) {
|
if (check_username.length > maxUsername) {
|
||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
username: {
|
username: {
|
||||||
code: "USERNAME_INVALID",
|
code: "BASE_TYPE_BAD_LENGTH",
|
||||||
message: `Username must be less than ${maxUsername} in length`,
|
message: `Must be between 2 and ${maxUsername} in length.`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user