Fix lint issue

This commit is contained in:
Tuan Dang
2023-11-01 11:20:09 +02:00
parent 911aa3fd8a
commit 7d802b41a8

View File

@@ -64,6 +64,10 @@ const schema = yup.object({
accessTokenTTL: yup
.string()
.test("is-positive-integer", "Access Token TTL must be a positive integer", (value) => {
if (typeof value === "undefined") {
return false;
}
const num = parseInt(value, 10);
return !Number.isNaN(num) && num > 0 && String(num) === value;
})