mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-10-10 05:47:00 +08:00
updated address handling
This commit is contained in:
parent
261f28c15c
commit
c35b719611
2 changed files with 21 additions and 18 deletions
|
@ -297,8 +297,7 @@ module.exports = (db, server) => {
|
||||||
name: Joi.string()
|
name: Joi.string()
|
||||||
.empty('')
|
.empty('')
|
||||||
.trim()
|
.trim()
|
||||||
.max(128)
|
.max(128),
|
||||||
.required(),
|
|
||||||
main: Joi.boolean()
|
main: Joi.boolean()
|
||||||
.truthy(['Y', 'true', 'yes', 'on', 1])
|
.truthy(['Y', 'true', 'yes', 'on', 1])
|
||||||
.falsy(['N', 'false', 'no', 'off', 0, '']),
|
.falsy(['N', 'false', 'no', 'off', 0, '']),
|
||||||
|
|
|
@ -549,14 +549,16 @@ module.exports = (db, server) => {
|
||||||
.lowercase()
|
.lowercase()
|
||||||
.length(24)
|
.length(24)
|
||||||
.empty(''),
|
.empty(''),
|
||||||
targets: Joi.array().items(
|
targets: Joi.array()
|
||||||
Joi.string().email(),
|
.items(
|
||||||
Joi.string().uri({
|
Joi.string().email(),
|
||||||
scheme: [/smtps?/, /https?/],
|
Joi.string().uri({
|
||||||
allowRelative: false,
|
scheme: [/smtps?/, /https?/],
|
||||||
relativeOnly: false
|
allowRelative: false,
|
||||||
})
|
relativeOnly: false
|
||||||
)
|
})
|
||||||
|
)
|
||||||
|
.empty('')
|
||||||
})
|
})
|
||||||
.required()
|
.required()
|
||||||
});
|
});
|
||||||
|
@ -869,14 +871,16 @@ module.exports = (db, server) => {
|
||||||
.lowercase()
|
.lowercase()
|
||||||
.length(24)
|
.length(24)
|
||||||
.empty(''),
|
.empty(''),
|
||||||
targets: Joi.array().items(
|
targets: Joi.array()
|
||||||
Joi.string().email(),
|
.items(
|
||||||
Joi.string().uri({
|
Joi.string().email(),
|
||||||
scheme: [/smtps?/, /https?/],
|
Joi.string().uri({
|
||||||
allowRelative: false,
|
scheme: [/smtps?/, /https?/],
|
||||||
relativeOnly: false
|
allowRelative: false,
|
||||||
})
|
relativeOnly: false
|
||||||
)
|
})
|
||||||
|
)
|
||||||
|
.empty('')
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue