- handle form save for jwtTTL
- update validation for advanced settings page black list some unused fields which causing errors
This commit is contained in:
1 parent
a4344b89a2
commit
57edff36c9
3 files changed
+50
-23
No files matched your search
@@ -138,18 +138,20 @@ const advancedSettingsValidation = joi.object({
|
||||
systemEmailPort: joi.string().allow(""),
|
||||
systemEmailAddress: joi.string().allow(""),
|
||||
systemEmailPassword: joi.string().allow(""),
|
||||
jwtTTL: joi.string().trim().messages({
|
||||
"string.empty": "JWT TTL is required.",
|
||||
}),
|
||||
jwtTTLNum: joi
|
||||
.number()
|
||||
.messages({
|
||||
"any.required": "JWT TTL is required.",
|
||||
}),
|
||||
jwtTTLUnits: joi
|
||||
.string()
|
||||
.trim()
|
||||
.custom((value, helpers) => {
|
||||
if (value == 0) {
|
||||
if( !["days", "hours"].includes(value)) {
|
||||
return helpers.message("JWT TTL unit is required.");
|
||||
}
|
||||
return value;
|
||||
}),
|
||||
}),
|
||||
dbType: joi.string().trim().messages({
|
||||
"string.empty": "DB type is required.",
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user