Making the error message dynamic
This commit is contained in:
parent
9efe160340
commit
3dcabc57f6
@ -10,7 +10,7 @@
|
|||||||
"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}} years or older",
|
"DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older",
|
||||||
"PASSWORD_REQUIREMENTS_MIN_LENGTH": "Must be at least 8 characters long.",
|
"PASSWORD_REQUIREMENTS_MIN_LENGTH": "Must be at least {{min}} characters long.",
|
||||||
"CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.",
|
"CONSENT_REQUIRED": "You must agree to the 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"
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ router.post(
|
|||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
password: {
|
password: {
|
||||||
code: "PASSWORD_REQUIREMENTS_MIN_LENGTH",
|
code: "PASSWORD_REQUIREMENTS_MIN_LENGTH",
|
||||||
message: req.t("auth:register.PASSWORD_REQUIREMENTS_MIN_LENGTH")
|
message: req.t("auth:register.PASSWORD_REQUIREMENTS_MIN_LENGTH", { min: register.password.minLength })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user