title: Javax Validation - Values from Properties
body: <p>I have a Spring Boot project (currently using 2.2.6), with web starter.</p>
  
  <p>In some classes I use validation annotations like</p>
  
  <pre><code>@Size(max = 1, min = 2)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@Pattern(regexp = "[0-9]+")
  </code></pre>
  
  <p>on fields, from <code>javax.validation.constraints</code></p>
  
  <p>It works as expected, but the values for the annotations are hard coded. I would like to set them dynamically, for example reading from a properties file, because in some situations the values might be different.</p>
  
  <p>Is that possible, how to do it?</p>