{"record":{"id":"878e942da81bd0fd","repo":"medusajs/medusa","slug":"tab-property-at-the-j-index-of-the-forms-pr","errorCode":null,"errorMessage":"'tab' property at the ${j} index of the 'forms' property is not a string literal. The 'tab' property must be a string literal, e.g. 'general' or 'attributes'.","messagePattern":"'tab' property at the (.+?) index of the 'forms' property is not a string literal\\. The 'tab' property must be a string literal, e\\.g\\. 'general' or 'attributes'\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts","lineNumber":317,"sourceCode":"    }\n\n    if (!isStringLiteral(zoneProperty.value)) {\n      logger.warn(\n        `'zone' property at the ${j} index of the 'forms' property is not a string literal. The 'zone' property must be a string literal, e.g. 'general' or 'attributes'.`,\n        { file }\n      )\n      return\n    }\n\n    const tabProperty = element.properties.find(\n      (p) => isObjectProperty(p) && isIdentifier(p.key, { name: \"tab\" })\n    ) as ObjectProperty | undefined\n\n    let tab: string | undefined\n\n    if (tabProperty) {\n      if (!isStringLiteral(tabProperty.value)) {\n        logger.warn(\n          `'tab' property at the ${j} index of the 'forms' property is not a string literal. The 'tab' property must be a string literal, e.g. 'general' or 'attributes'.`,\n          { file }\n        )\n        return\n      }\n\n      tab = tabProperty.value.value\n    }\n\n    if (tab && !isValidCustomFieldFormTab(tab)) {\n      logger.warn(\n        `'tab' property at the ${j} index of the 'forms' property is not a valid custom field form tab for the '${model}' model. Received: ${tab}.`,\n        { file }\n      )\n      return\n    }\n\n    const zone = zoneProperty.value.value","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts#L299-L335","documentation":"The optional 'tab' property of a custom-field form entry must be a string literal so the plugin can statically resolve it. When 'tab' is present but its value is not a StringLiteral AST node (a variable, expression, template literal, etc.), this warning is emitted and the entry is skipped.","triggerScenarios":"tab: TAB_NAME, tab: `general`, or tab: cond ? 'general' : 'attributes' inside a forms entry that already has a valid zone.","commonSituations":"Reusing tab constants across form modules, conditional tab selection, or copy-paste from code that computed tab names.","solutions":["Replace the expression with a literal such as tab: 'general'","Remove 'tab' entirely if the default tab for the zone is acceptable","Inline any imported constant value as a literal"],"exampleFix":"// before\nforms: [{ zone: 'general', tab: `general`, fields: {...} }]\n// after\nforms: [{ zone: 'general', tab: 'general', fields: {...} }]","handlingStrategy":"type-guard","validationCode":"forms.forEach((f, i) => {\n  if (f.tab !== undefined && typeof f.tab !== 'string') {\n    throw new Error(`forms[${i}].tab must be a string literal`)\n  }\n})","typeGuard":"const isTabLiteral = (v: unknown): v is string | undefined => v === undefined || typeof v === 'string'","tryCatchPattern":null,"preventionTips":["Inline tab names as string literals","Omit tab when unsure; the zone default applies"],"tags":["admin","custom-fields","string-literal","ast-parsing"],"backgroundTag":"admin-custom-field-form-validation","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}