Ya so your issue is you are using the wrong start command
when you have form validation constraints you need to use the /submit-form endpoint
localhost:8080/engine-rest/process-definition/key/minlength/submit-form
{
"variables": {
"first_name": {
"value": "a",
"type": "String"
},
"priority": {
"value": 22,
"type": "Integer"
}
}
}
{
"type": "RestException",
"message": "Cannot instantiate process definition minlength:3:9fdfd834-43c7-11e8-91b5-0242ac130002: Invalid value submitted for form field 'first_name': validation of minlength(2) failed."
}
which uses your validation constraints.
you need to be using the Form Service when using the Java API:
Start with Form Submission: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/FormService.html#submitStartForm(java.lang.String,%20java.util.Map)
User Task Submission: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/FormService.html#submitTaskForm(java.lang.String,%20java.util.Map)
you can also take a look at: Form Server Validations: Generic Form Validator using Javascript which will give you more control over validations
For ref:
https://docs.camunda.org/manual/7.8/reference/rest/process-definition/post-submit-form/