mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-14 19:38:40 -05:00
better error message for invalid emails
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user