title: Java validation @min @max annotion for null values
body: <p>I have put validation for the following field, </p>
  
  <pre><code>@Min(1)
  @Max(500)
  private int length;
  </code></pre>
  
  <p>however, the length isn't a required field but when I didn't give the "length" in the input, I got this error:</p>
  
  <pre><code>   "Validation error, message = must be greater than or equal to 1, path = length"
  </code></pre>
  
  <p>Looking at the @min and @max documentation, it says "null element is considered valid".   I know that. If @min @max is only for primitive type, then why the documentation mentions "null" element is considered valid?  Can someone let me know how to fix the validation problem?  Many thanks.</p>