[hibernate-dev] Money Validation

Gunnar Morling gunnar at hibernate.org
Thu Sep 29 13:46:02 EDT 2016


Hi Willi,

My preference would be to limit the first round to the actual javax.money
stuff.

We are running a survey currently at
http://beanvalidation.org/news/2016/09/15/which-constraints-to-add/ asking
whether to add @Negative/@Positive. Based on that we need to decide whether
to add them to the spec, or - if not - to HV. On the others I'm not so
sure, they don't seem to add too much IMHO.

Cheers,

--Gunnar


2016-09-29 14:43 GMT+02:00 Willi Schönborn <w.schoenborn at gmail.com>:

> Hi,
>
> I'm currently preparing a pull request to contribute Java Money related
> validators to HV:
> https://github.com/zalando/money-validation
>
> The main part are custom validators to add support for MonetaryAmount to
> the following constraints:
>
>    - DecimalMax
>    - DecimalMin
>    - Max
>    - Min
>
> As an addition we defined the following custom constraints:
>
>    - Negative
>    - NegativeOrZero
>    - Positive
>    - PositiveOrZero
>    - Zero
>
> Their names are closely aligned to methods in MonetaryAmount, but they are
> in fact built solely on top of the standard constraints DecimalMax and
> DecimalMin. So in theory somebody can use those with int, longs,
> BigDecimals, BigInteger, CharSequence, ... You get the idea.
>
> My question now is, are you guys interested in those custom constraints as
> well or should I limit my pull request to the validators for
> MonetaryAmount?
>
> Best,
> Willi
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list