Add .unknown(true) to validation schema to ignore extra fields

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-05-06 14:53:24 -04:00
1 parent 47f8494193
commit 336ffcc9e9
1 file changed
+2 -1
+2 -1
View File
@@ -256,7 +256,8 @@ const settingsValidation = joi.object({
"string.empty": "TTL is required", "string.empty": "TTL is required",
}), }),
pagespeedApiKey: joi.string().allow("").optional(), pagespeedApiKey: joi.string().allow("").optional(),
}); })
.unknown(true);
const dayjsValidator = (value, helpers) => { const dayjsValidator = (value, helpers) => {
if (!dayjs(value).isValid()) { if (!dayjs(value).isValid()) {