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

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