Regarding validating invariants.

DISCUSSION: Should there be some way to trigger validation of bean constraints upon method invocations?

> in OVal we have
  @PreValidateThis - which requires that all invariants of the target object satisfy their declared constraints before the annotated method of the target object is executed
  @PostValidateThis
- which requires that all invariants of the target object satisfy their declared constraints after the annotated method of the target object is executed but before it returns

> I would like to see something like this in the spec

Seb

On 14.02.2012 21:04, Gunnar Morling wrote:
Hi all,

many thanks to those who already provided me with feedback on the
method validation proposal.

Everyone else I'd like to invite to have a closer look at the proposal
and share your thoughts. As I mentioned, there are several sections
needing further consideration or a decision to be made; I'll start
dedicated threads regarding these items on the mailing list within the
next days.

Thanks again for your efforts,

--Gunnar


2012/1/29 Gunnar Morling <gunnar.morling@googlemail.com>:
Hi all,

I've pushed now a first version of the proposal for method validation
(BV-241) to beanvalidation.org [1].

The proposal is still missing some parts (e.g. the XML configuration),
but I hope it touches all major issues related to method validation.
Throughout the document I've used the "DISCUSSION" marker for sections
which still need further consideration or a decision between several
possible options.

I'd be very happy on any feedback related to these issues in
particular but of course also to the complete proposal in general.
Don't hesitate to speak up in case you think anything is incomplete,
is missing or something doesn't make sense to you; after all this is
very much work in progress. Feel free to add remarks in place within
the document or start a dedicated discussion on the mailing list.

--Gunnar

[1] http://beanvalidation.org/proposals/BVAL-241/
_______________________________________________
beanvalidation-dev mailing list
beanvalidation-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev