diff --git a/web/src/components/credentials/lib.ts b/web/src/components/credentials/lib.ts index a9ab3ca19..d7ef8e1ea 100644 --- a/web/src/components/credentials/lib.ts +++ b/web/src/components/credentials/lib.ts @@ -16,7 +16,15 @@ export function createValidationSchema(json_values: Record) { const displayName = getDisplayNameForCredentialKey(key); - if (json_values[key] === null) { + if (typeof json_values[key] === "boolean") { + // Ensure false is considered valid + schemaFields[key] = Yup.boolean() + .nullable() + .default(false) + .transform((value, originalValue) => + originalValue === undefined ? false : value + ); + } else if (json_values[key] === null) { // Field is optional: schemaFields[key] = Yup.string() .trim()