Validating double and float values using Hibernate Validator - bean validation

前端 未结 6 1451
心在旅途
心在旅途 2020-12-29 11:16

I\'m looking for a way to validate a java.lang.Double field in the Spring command bean for its maximum and minimum values (a value must lie between a given rang

6条回答
  •  感情败类
    2020-12-29 11:23

    Newer versions of Hibernate Validator (at least 6.0.17) supports @DecimalMin/Max annotation on double

    See class for validation

提交回复
热议问题