mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
fix: relax email checking (#9182)
This commit is contained in:
parent
e72a7c1197
commit
9f568b79b2
@ -90,7 +90,15 @@ export default class User implements IUser {
|
|||||||
if (!id) {
|
if (!id) {
|
||||||
throw new ValidationError('Id is required', [], undefined);
|
throw new ValidationError('Id is required', [], undefined);
|
||||||
}
|
}
|
||||||
Joi.assert(email, Joi.string().email({ ignoreLength: true }), 'Email');
|
try {
|
||||||
|
Joi.assert(
|
||||||
|
email,
|
||||||
|
Joi.string().email({ ignoreLength: true }),
|
||||||
|
'Email',
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Invalid email', email, e);
|
||||||
|
}
|
||||||
Joi.assert(username, Joi.string(), 'Username');
|
Joi.assert(username, Joi.string(), 'Username');
|
||||||
Joi.assert(name, Joi.string(), 'Name');
|
Joi.assert(name, Joi.string(), 'Name');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user