yes, I'm with you. In general the current function should work with the value instance and not with the wrapper. But I think there are some points how this can be done better:
- It should be added to the JavaDoc that wrapper can not be passed
- We maybe should think about an additional method in that we simply can pass the wrapper
My problem was that I had no idea why this was not working. In the model I have a wrapper as a field. When I validate the model as an instance everything is fine. When I pass in the value of the field (the wrapper) it ends with an error. Since I created a value based validation that worked on generics the problem was first very strange. Needed to find some time why this is not working... |