mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-26 04:03:03 +01:00
🐛 fix register date of birth
This commit is contained in:
parent
8505d9279b
commit
18d4aa0c67
@ -8,7 +8,7 @@
|
|||||||
"INVITE_ONLY": "You must be invited to register",
|
"INVITE_ONLY": "You must be invited to register",
|
||||||
"EMAIL_INVALID": "Invalid Email",
|
"EMAIL_INVALID": "Invalid Email",
|
||||||
"EMAIL_ALREADY_REGISTERED": "Email is already registered",
|
"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.",
|
"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"
|
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another"
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ router.post(
|
|||||||
$email: Email,
|
$email: Email,
|
||||||
$fingerprint: String,
|
$fingerprint: String,
|
||||||
$invite: String,
|
$invite: String,
|
||||||
$date_of_birth: String, // "2000-04-03"
|
$date_of_birth: Date, // "2000-04-03"
|
||||||
$gift_code_sku_id: String,
|
$gift_code_sku_id: String,
|
||||||
$captcha_key: String,
|
$captcha_key: String,
|
||||||
}),
|
}),
|
||||||
@ -110,7 +110,7 @@ router.post(
|
|||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
date_of_birth: {
|
date_of_birth: {
|
||||||
code: "DATE_OF_BIRTH_UNDERAGE",
|
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 }),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user