krasa / krasa-jaxb-tools

XJC / JAXB plugin for generation of Bean Validation Annotations (JSR-303) and replacing primitive types
Apache License 2.0
61 stars 47 forks source link

Bug in @Digits annotations #58

Closed NBau closed 6 years ago

NBau commented 7 years ago

It seems that xml schema and jsr303 have a different style of expressing the allowed digits. In xml schema, you provide totaldigits and fractionDigits, in jsr303 it is integer and fraction. The plugin assumes that totalDigits equals integer, but correctly it should be integer = totalDigits - fractionDigits.

krasa commented 7 years ago

Please read https://github.com/krasa/krasa-jaxb-tools/issues/40#issuecomment-173947457