{"record":{"id":"353f6071de3f4fc5","repo":"AykutSarac/jsoncrack.com","slug":"allowed-formats-are-json-yaml-csv-xml","errorCode":null,"errorMessage":"Allowed formats are JSON, YAML, CSV, XML","messagePattern":"Allowed formats are JSON, YAML, CSV, XML","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"apps/www/src/features/editor/FullscreenDropzone.tsx","lineNumber":52,"sourceCode":"        h=\"100vh\"\n        style={{ pointerEvents: \"none\" }}\n      >\n        <Dropzone.Accept>\n          <VscFiles size={100} />\n          <Text fz=\"h1\" fw={500} mt=\"lg\">\n            Upload to JSON Crack\n          </Text>\n          <Text fz=\"lg\" c=\"dimmed\" mt=\"sm\">\n            (Max file size: 300 KB)\n          </Text>\n        </Dropzone.Accept>\n        <Dropzone.Reject>\n          <VscCircleSlash size={100} />\n          <Text fz=\"h1\" fw={500} mt=\"lg\">\n            Invalid file\n          </Text>\n          <Text fz=\"lg\" c=\"dimmed\" mt=\"sm\">\n            Allowed formats are JSON, YAML, CSV, XML\n          </Text>\n        </Dropzone.Reject>\n      </Group>\n    </Dropzone.FullScreen>\n  );\n};\n","sourceCodeStart":34,"sourceCodeEnd":59,"githubUrl":"https://github.com/AykutSarac/jsoncrack.com/blob/3c9af69e23c635356293b6b28cf4cd0af10d1059/apps/www/src/features/editor/FullscreenDropzone.tsx#L34-L59","documentation":"Helper text under the Dropzone.Reject state listing the four accepted formats. Static UI copy clarifying the 'Invalid file' reject message. It must stay in sync with the accept prop or it will mislead users.","triggerScenarios":"Same as the Invalid file reject state — a dropped file whose MIME is not accepted.","commonSituations":"Same as the reject state; additionally the list can drift from the actual accept array if one is edited and the other is not.","solutions":["Keep this string in sync with the accept prop whenever formats change.","If adding a format (e.g. JSON5), update both accept and this label.","Derive the label from a single source of truth to prevent drift."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const ACCEPTED_FORMATS = [\"JSON\", \"YAML\", \"CSV\", \"XML\"] as const;\n// Render the helper label from the same source as the accept prop\nconst allowedLabel = `Allowed formats are ${ACCEPTED_FORMATS.join(\", \")}`;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive the helper label from the same array that drives the accept prop so they never drift.","When adding a format, update both the accept prop and this label in one commit."],"tags":["dropzone","ui-text","file-upload"],"backgroundTag":null,"analyzedSha":"3c9af69e23c635356293b6b28cf4cd0af10d1059","analyzedAt":"2026-08-12T19:00:27.891Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}