{"record":{"id":"dc567f51f800a817","repo":"flowable/flowable-engine","slug":"invalid-date-value-propertyvalue","errorCode":null,"errorMessage":"invalid date value \" + propertyValue","messagePattern":"invalid date value \" \\+ propertyValue","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/form/DateFormType.java","lineNumber":71,"sourceCode":"            return datePattern;\n        }\n        return null;\n    }\n\n    @Override\n    public Object convertFormValueToModelValue(String propertyValue) {\n        if (StringUtils.isEmpty(propertyValue)) {\n            return null;\n        }\n        try {\n            if (lenientDateParsing) {\n                return dateFormat.parseObject(propertyValue);\n            }\n            // FastDateFormat is always lenient, so strict parsing uses DateUtils,\n            // which also rejects input with trailing characters after the date.\n            return DateUtils.parseDateStrictly(propertyValue, datePattern);\n        } catch (ParseException e) {\n            throw new FlowableIllegalArgumentException(\"invalid date value \" + propertyValue, e);\n        }\n    }\n\n    @Override\n    public String convertModelValueToFormValue(Object modelValue) {\n        if (modelValue == null) {\n            return null;\n        }\n        return dateFormat.format(modelValue);\n    }\n}\n","sourceCodeStart":53,"sourceCodeEnd":83,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/form/DateFormType.java#L53-L83","documentation":"DateFormType.convertFormValueToModelValue parses the submitted form string into a Date using the configured date pattern (strictly, rejecting trailing characters). If parsing fails with a ParseException, FlowableIllegalArgumentException 'invalid date value <input>' is thrown. The input does not match the declared pattern or is not a real date.","triggerScenarios":"Submitting a form property of type 'date' via FormService.submitTaskFormData / startProcessInstanceByForm where the value does not parse with the form's datePattern (e.g. '31/02/2020', '2020-01-05 12:00' against pattern 'dd/MM/yyyy', or '05/01/2020 x').","commonSituations":"Locale differences (US MM/dd vs dd/MM), users typing free-form dates in a UI, timezone/extra characters appended, pattern changed in BPMN but clients still sending the old format.","solutions":["Format the submitted value exactly per the datePattern declared for the form property in the BPMN (e.g. SimpleDateFormat with that pattern).","Validate/parse client-side before submission and show a pattern-specific error.","Update the form's flowable:datePattern attribute if the required format changed.","Normalize input (trim, strip trailing text) before calling the form service."],"exampleFix":"// before\nproperties.put(\"startDate\", \"2020-1-5\"); // pattern is dd/MM/yyyy\n// after\nproperties.put(\"startDate\", new SimpleDateFormat(\"dd/MM/yyyy\").format(\n    new GregorianCalendar(2020, Calendar.JANUARY, 5).getTime()));","handlingStrategy":"validation","validationCode":"String pattern = formProperty.getDatePattern();\ntry {\n    new SimpleDateFormat(pattern).parse(submittedValue);\n} catch (ParseException e) {\n    throw new IllegalArgumentException(\"Value must match pattern \" + pattern);\n}","typeGuard":null,"tryCatchPattern":"try {\n    formService.submitStartFormData(processDefinitionId, properties);\n} catch (FlowableIllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"invalid date value\")) {\n        properties.put(dateField, reformatToPattern(properties.get(dateField)));\n        formService.submitStartFormData(processDefinitionId, properties);\n    } else { throw e; }\n}","preventionTips":["Render date inputs with the exact BPMN datePattern (e.g. with a date picker formatted accordingly).","Validate client-side before submission.","Trim and strip any trailing characters from user-entered dates.","Keep datePattern in sync across all forms using the same field."],"tags":["flowable","forms","date-parsing","validation"],"backgroundTag":"invalid-date-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}