Anyway, BigDecimal provides two methods you could use:
• precision() — The precision is the number of digits in the unscaled value
• scale() — If zero or positive, the scale is the number of digits to the right of the decimal point.
so you could define your extensions on BigDecimal to check for those constraints