diff --git a/locales/en/auth.json b/locales/en/auth.json
index ea5633df..88c2c003 100644
--- a/locales/en/auth.json
+++ b/locales/en/auth.json
@@ -8,7 +8,7 @@
"INVITE_ONLY": "You must be invited to register",
"EMAIL_INVALID": "Invalid Email",
"EMAIL_ALREADY_REGISTERED": "Email is already registered",
- "DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} or older",
+ "DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older",
"CONSENT_REQUIRED": "You must agree to Terms of Service and Privacy Policy.",
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another"
}
diff --git a/src/routes/api/v8/auth/register.ts b/src/routes/api/v8/auth/register.ts
index e02d8152..410c7f50 100644
--- a/src/routes/api/v8/auth/register.ts
+++ b/src/routes/api/v8/auth/register.ts
@@ -20,7 +20,7 @@ router.post(
$email: Email,
$fingerprint: String,
$invite: String,
- $date_of_birth: String, // "2000-04-03"
+ $date_of_birth: Date, // "2000-04-03"
$gift_code_sku_id: String,
$captcha_key: String,
}),
@@ -110,7 +110,7 @@ router.post(
throw FieldErrors({
date_of_birth: {
code: "DATE_OF_BIRTH_UNDERAGE",
- message: req.t("auth:register.DATE_OF_BIRTH_UNDERAGE"),
+ message: req.t("auth:register.DATE_OF_BIRTH_UNDERAGE", { years: register.dateOfBirth.minimum }),
},
});
}
|