mirror of
https://github.com/strapi/strapi.git
synced 2025-08-11 18:27:22 +00:00
Merge pull request #4433 from NerdyLuffy/BugFix/API-register-user-mail-validation
Add Email validation on user register
This commit is contained in:
commit
10e39516b6
@ -448,6 +448,14 @@ module.exports = {
|
|||||||
|
|
||||||
if (isEmail) {
|
if (isEmail) {
|
||||||
params.email = params.email.toLowerCase();
|
params.email = params.email.toLowerCase();
|
||||||
|
} else {
|
||||||
|
return ctx.badRequest(
|
||||||
|
null,
|
||||||
|
formatError({
|
||||||
|
id: 'Auth.form.error.email.format',
|
||||||
|
message: 'Please provide valid email address.',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
params.role = role.id;
|
params.role = role.id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user