is there any way to validate number of digits in number in JSON schema validator (https://mvnrepository.com/artifact/com.networknt/json-schema-validator).
My number should have max 5 digits and no more than 3 decimal places. In my DTO this number is BigDecimal. I know that number of decimal places I can achieved with "multiplyOf" validator.
Maybe I should write own validator in JSON Schema Validator lib to validate max digits? If yes, how to do that?
You can use
exclusiveMaximumto validate the digits.Given the code
The output is