summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-26 18:45:25 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-26 18:45:25 +1100
commitf210344b07eb2a3b72ce8689464689ac6b7d7dc4 (patch)
treedae5f14ed441899fe753ba9c60c9cd8b469f95f3
parentPrevent client from deleting localStorage (diff)
downloadserver-f210344b07eb2a3b72ce8689464689ac6b7d7dc4.tar.xz
Fix typo in user validation
-rw-r--r--src/util/entities/User.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts
index 0344908d..409b4f74 100644
--- a/src/util/entities/User.ts
+++ b/src/util/entities/User.ts
@@ -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",
 					},