[hibernate-dev] Money Validation

Willi Schönborn w.schoenborn at gmail.com
Thu Sep 29 08:43:28 EDT 2016


I'm currently preparing a pull request to contribute Java Money related
validators to HV:

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?


More information about the hibernate-dev mailing list