How can I get a map.key as invalidValue


I have the following validation annotation:

private Map<@Size(max = 10) String, Chart> charts = new HashMap<>();

The validation itself work properly, but in the validation-error object I got the following properties:

      "code": "Size"
      "property": "charts[qqqqqqqqqqqq]",
      "invalidValue": {
        "id": 2,
        "name": "visitors",
        ... additional properties ...

But that’s not what I validated! This message says that the size of a Chart object is invalid under the key ‘qqqqqqqqqqqq’ in the charts map.

I want something like this:

      "property": "charts.keySet[]",
      "invalidValue": "qqqqqqqqqqqq"

It seems to a bug for me.