Hi contributers,
I'm trying to validate both the keys an values of a map like this:
Code:
@Valid public Map getMap(){...}
I wrote a test to confirm validation failure, and was surprised to see that the map keys were not validated. There are several use cases where this would be useful, so I don't see why it's not a part of the api.
Is this a bug, or do I have to write something like this to make it work:
Code:
// Validate the values
@Valid public Map getMap{...}
// Validate the keys
@Valid private Set validateMapKeys{...}
(Btw, fixing this is easily done in ClassValidator line 400 and outwards).
Regards,
Eirik