{"record":{"id":"a017573255e34799","repo":"FlowiseAI/Flowise","slug":"unsupported-modifier-modifier-name","errorCode":null,"errorMessage":"Unsupported modifier: ${modifier.name}","messagePattern":"Unsupported modifier: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/secureZodParser.ts","lineNumber":298,"sourceCode":"            }\n            return\n        }\n\n        // If it's a simple array, validate the inner type\n        if (typeInfo.isSimpleArray) {\n            this.validateTypeInfo(typeInfo.innerType)\n            return\n        }\n\n        // Validate base type\n        if (!this.ALLOWED_TYPES.includes(typeInfo.base)) {\n            throw new Error(`Unsupported type: ${typeInfo.base}`)\n        }\n\n        // Validate modifiers\n        for (const modifier of typeInfo.modifiers || []) {\n            if (!this.ALLOWED_TYPES.includes(modifier.name)) {\n                throw new Error(`Unsupported modifier: ${modifier.name}`)\n            }\n        }\n    }\n\n    private static parseArguments(argsStr: string): any[] {\n        // Remove outer parentheses\n        const inner = argsStr.slice(1, -1).trim()\n        if (!inner) return []\n\n        // Simple argument parsing for basic cases\n        if (inner.startsWith('[') && inner.endsWith(']')) {\n            // Array argument\n            const arrayContent = inner.slice(1, -1)\n            return [this.parseArrayContent(arrayContent)]\n        } else if (inner.match(/^\\d+$/)) {\n            // Number argument\n            return [parseInt(inner, 10)]\n        } else if (inner.startsWith('\"') && inner.endsWith('\"')) {","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/secureZodParser.ts#L280-L316","documentation":"validateTypeInfo requires every modifier name to be in ALLOWED_TYPES = [string, number, int, boolean, date, object, array, enum, optional, max, min, describe, default]. So .email(), .url(), .regex(), .nonempty(), .length(), .transform(), .refine() all fail; only modifiers in the list (e.g. .optional, .max, .min, .int, .describe, .default, .array) pass validation. Note the list conflates base types and modifiers by design.","triggerScenarios":"Chaining format/refinement validators like '.email()', '.url()', '.regex(/.../)', '.nonempty()', '.length(5)', '.transform(...)', '.refine(...)'.","commonSituations":"Bringing in validation idioms from full Zod; enforcing email/url formats via modifiers.","solutions":["Drop unsupported modifiers and enforce constraints via the allowed ones (.max, .min, .describe, .default, .optional).","For format validation (email/url), validate in your own code on the parsed value instead of in the schema string.","If you control the parser, extend ALLOWED_TYPES and add a case in applyModifiers for the new modifier."],"exampleFix":"// before\n'z.object({ email: z.string().email() })'\n\n// after\n'z.object({ email: z.string().max(254).describe(\"email\") })' // format checked in app code","handlingStrategy":"type-guard","validationCode":"const SUPPORTED_MODS = new Set(['optional','max','min','int','describe','default','array'])\nfunction onlyAllowedModifiers(schema: string): boolean {\n  return !/\\.(email|url|regex|nonempty|length|transform|refine|includes|startsWith|endsWith|ip|cuid|uuid|datetime)\\b/.test(schema)\n}","typeGuard":"const SUPPORTED = new Set(['string','number','int','boolean','date','object','array','enum','optional','max','min','describe','default'])\nconst isAllowedModifier = (name: string): boolean => SUPPORTED.has(name)","tryCatchPattern":null,"preventionTips":["Use only modifiers in ALLOWED_TYPES: .optional, .max, .min, .int, .describe, .default, .array.","Enforce format constraints (email/url/regex) in application code on the parsed value.","If you own the parser, extend ALLOWED_TYPES and add a matching case in applyModifiers."],"tags":["zod","schema","validation","modifier","subset"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}