How to do backend validations for on the data submitted by a embedded form?

As the subject above. How to supply my own validation (i.e. java classes) on bpmn, so that “engine-rest” and “tasklist” able to response the error message if invalid input detected?

@uf-kelvin-low take a look at: Form Server Validations: Generic Form Validator using Javascript

If you don’t like the use of Js you can just swap out the logic for calling a Java class