I was attempting to respond to this yesterday, but apparently my message
never got sent and the draft was lost. :/ While I like the idea of using
EL, I feel we will be stepping into a minefield of backwards compatibility
issues. Consider "order total exceeds ${budget}". Is this a BV 1.0
message template with a literal dollar sign and a parameter "budget" or a
(proposed) BV 1.1 template with an embedded EL? The same consideration
applies if we use #{} (I would recommend we accept either one). This might
be addressed with an optional (for BC) annotation parameter, but 1) it
seems to step on the toes of the MessageInterpolator interface, and 2) it
requires the user to specify how his message is defined. I suppose we
could define some alternate trigger and translate it before sending to EL,
but this seems a bit less than ideal as well.
Matt
On Wed, Dec 12, 2012 at 5:05 AM, Hardy Ferentschik <hardy(a)hibernate.org>wrote:
On 11 Jan 2012, at 2:52 PM, Emmanuel Bernard <emmanuel(a)hibernate.org>
wrote:
> I did a quick look at the Expression Language JSR and that might be
enough for what we want to do. We could simply delegate message
interpolation to the EL engine. It has the ternary operator which would
offer what we need for DecimalMin / Max messages.
>
> Can someone dive into this approach to see of that is indeed doable and
how much work we need to do in the specification?
I can have a look on how this could look like.
--Hardy
_______________________________________________
beanvalidation-dev mailing list
beanvalidation-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev