0

In my application I am trying to upload file and JSON object as multipart/mixed. I able to process the MultipartFormDataInput and successfully unmarshall the data. But I need to apply our bean validation for this JSON object while unmarshalling and I have no idea about how to do that. Does anyone has experience in bean validation with multipart/form-data? Highly appreciate your thoughts.

JagKum
  • 183
  • 2
  • 18
  • what you mean by bean validation – hhafeez Feb 24 '17 at 00:04
  • What framework are you using for the web resource accepting the inputs? I Expect the `MultipartFormDataInput` is not relevant, you just want to be able to validate the fields on the input JSON object? – James Feb 24 '17 at 00:09
  • OK, I see it's definitely relevant, there is a lot on applying validation to RESTeasy: https://docs.jboss.org/resteasy/docs/3.0.4.Final/userguide/html/Validation.html but it's lacking for `MultipartFormDataInput` – James Feb 24 '17 at 00:24
  • @James Thanks for your comments. The issue in here is my JSON object is in MultipartInput of the MultipartFormDataInput. I can unmarshall it as per the documentation like List cust = part.getBody(new GenericType>List>Customer<<() {}); But it won't apply my bean validation. – JagKum Feb 24 '17 at 00:44

0 Answers0