Merge pull request #2281 from Anurag123Chauhan/fix/error-msg-change
Changed error msg of invalid of Docker container ID
This commit is contained in:
1 file changed
+11
-7
@@ -109,7 +109,11 @@ const monitorValidation = joi.object({
|
|||||||
then: joi
|
then: joi
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
.regex(/^[a-z0-9]{64}$/),
|
.regex(/^[a-z0-9]{64}$/)
|
||||||
|
.messages({
|
||||||
|
"string.empty": "This field is required.",
|
||||||
|
"string.pattern.base": "Please enter a valid 64-character Docker container ID.",
|
||||||
|
}),
|
||||||
otherwise: joi
|
otherwise: joi
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
@@ -156,13 +160,12 @@ const monitorValidation = joi.object({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
})
|
||||||
|
.messages({
|
||||||
|
"string.empty": "This field is required.",
|
||||||
|
"string.uri": "The URL you provided is not valid.",
|
||||||
|
"string.invalidUrl": "Please enter a valid URL with optional port",
|
||||||
}),
|
}),
|
||||||
})
|
|
||||||
.messages({
|
|
||||||
"string.empty": "This field is required.",
|
|
||||||
"string.uri": "The URL you provided is not valid.",
|
|
||||||
"string.invalidUrl": "Please enter a valid URL with optional port",
|
|
||||||
"string.pattern.base": "Please enter a valid container ID.",
|
|
||||||
}),
|
}),
|
||||||
port: joi
|
port: joi
|
||||||
.number()
|
.number()
|
||||||
@@ -265,6 +268,7 @@ const statusPageValidation = joi.object({
|
|||||||
showUptimePercentage: joi.boolean(),
|
showUptimePercentage: joi.boolean(),
|
||||||
showCharts: joi.boolean(),
|
showCharts: joi.boolean(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const settingsValidation = joi.object({
|
const settingsValidation = joi.object({
|
||||||
checkTTL: joi.number().required().messages({
|
checkTTL: joi.number().required().messages({
|
||||||
"string.empty": "Please enter a value",
|
"string.empty": "Please enter a value",
|
||||||
|
|||||||
Reference in new issue
Block a user