A colleague just sent over a link to a blog about the Hibernate Validator 4.1.0 release:
http://musingsofaprogrammingaddict.blogspot.com/2010/06/whats-new-in-hibernate-validator-41.html In particular, they now offer a dynamic API. Does anyone have any thoughts on the API they've created? IMO if they have dynamic constraints, and bval has dynamic constraints, eventually the spec will have dynamic constraints. I personally don't think that dynamic constraints are that powerful unless you have ways of "branching" constraint mappings from globally-applicable down to instance-level (and possibly steps in between). I'm also not thrilled with their fluent builders: they seem nice to use at compile-time, but the fact that they would require a different builder per constraint type to be written or generated seems less than optimal. I am wondering if we could borrow some ideas from e.g. Mockito to stay typesafe and compiler-checked yet avoid the need to write a builder per constraint. Thoughts? -Matt
