better error message for invalid emails

This commit is contained in:
jelveh
2025-04-13 18:24:06 -07:00
parent 398b1578a5
commit 2d7ca7f2e1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ router.post('/save_account', auth, express.json(), async (req, res, next)=>{
const clean_email = svc_cleanEmail.clean(req.body.email);
if ( ! await svc_cleanEmail.validate(clean_email) ) {
return res.status(400).send('This email domain is not allowed.');
return res.status(400).send('This email does not seem to be valid.');
}
const svc_edgeRateLimit = req.services.get('edge-rate-limit');
+1 -1
View File
@@ -190,7 +190,7 @@ module.exports = eggspress(['/signup'], {
const clean_email = svc_cleanEmail.clean(req.body.email);
if (clean_email !== '' && !req.body.is_temp && ! await svc_cleanEmail.validate(clean_email) ) {
return res.status(400).send('Failed to create an account. Please try again.');
return res.status(400).send('This email does not seem to be valid.');
}
// duplicate username check