Uploaded image for project: 'Hibernate Validator'
  1. HV-1637

PropertyNotFoundException for @DecimalMax when using the German translation

    Details

      Description

      Issue

      We are using a simple @DecimalMax("99.999") validation on our DTO class. In a german environment a PropertyNotFoundException is thrown because of a missing property 'strict'.

      Cause

      The cause is the wrong message in ValidationMessages_de.properties which references strict:

      javax.validation.constraints.DecimalMax.message = muss kleiner ${strict == false ? 'oder gleich ' : ''}{value} sein
      

      (source: https://github.com/hibernate/hibernate-validator/blob/master/engine/src/main/resources/org/hibernate/validator/ValidationMessages_de.properties#L3)

      While the message in the default ValidationMessages.properties correctly references inclusive :

      javax.validation.constraints.DecimalMax.message = must be less than ${inclusive == true ? 'or equal to ' : ''}{value}
      

      (source: https://github.com/hibernate/hibernate-validator/blob/master/engine/src/main/resources/org/hibernate/validator/ValidationMessages.properties#L3)

      Suggested Solution

      Replace strict by inclusive in german translation of javax.validation.constraints.DecimalMax.message

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: