Jakarta Bean Validation

Work on method level validation

Posted by Emmanuel Bernard    |    16 Sep 2011    proposal

The expert groups has begun its work on method-level validation. A feature that was drafted in the latest spec (appendix) but that we could nto finish in time.

You will be able to define constraints on parameters and your favorite interception technology (CDI, @Inject, AspectJ, Spring etc) will call Bean Validation.

The final approach is not fixed yet but it will look like this.

public class BidManager {
    public void placeBid(@Min(0) BigDecimal upTo) { ... }

Want to know more? Join the expert group mailing list. Learn how.