mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 18:32:29 +01:00
Fix typo in user validation
This commit is contained in:
parent
3e9ead8b5e
commit
f210344b07
@ -221,21 +221,21 @@ export class User extends BaseClass {
|
||||
const discrim = Number(this.discriminator);
|
||||
if (this.discriminator.length > 4)
|
||||
throw FieldErrors({
|
||||
email: {
|
||||
discriminator: {
|
||||
message: "Discriminator cannot be more than 4 digits.",
|
||||
code: "DISCRIMINATOR_INVALID",
|
||||
},
|
||||
});
|
||||
if (isNaN(discrim))
|
||||
throw FieldErrors({
|
||||
email: {
|
||||
discriminator: {
|
||||
message: "Discriminator must be a number.",
|
||||
code: "DISCRIMINATOR_INVALID",
|
||||
},
|
||||
});
|
||||
if (discrim <= 0 || discrim >= 10000)
|
||||
throw FieldErrors({
|
||||
email: {
|
||||
discriminator: {
|
||||
message: "Discriminator must be a number.",
|
||||
code: "DISCRIMINATOR_INVALID",
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user