title: How to java bean validate range only if not null or zero
body: <p>I would like to use Java Bean Validation to validate an Integer.
  It is a validation of multiple validations.</p>
  
  <p>I'm currently using Spring Boot and validation, and system is using a <code>@RestController</code> where I'm receiving the post-call.</p>
  
  <pre><code>public Person addPerson(@RequestBody @Validated Person Person) {/*the code*/}
  </code></pre>
  
  <p>I would like the age to be validated, where these values are valid:</p>
  
  <pre><code>age == null or age == 0 or (age &gt;= 15 and age &lt;= 80)
  
  
  public class Person {
      private Integer age;
  }
  </code></pre>
  
  <p>I would like to be able to use the current validation constraints of java.
  Do I need to implement my own constraint annotation ?</p>
  
  <p>This would be nice, but this does not work:</p>
  
  <pre><code>public class Person {
      @Null
      @Range(min=0, max=0)
      @Range(min=15, max = 80)
      private Integer age;
  }
  </code></pre>