title: how to set a String with fixed length in grails constraints?
body: <p>I have this domain class</p>
  
  <pre><code>class Client {
    String idCard
    ...
  
    static constraints = {
      idCard size:16
      ...
    }
  }
  </code></pre>
  
  <p>I created some test data in bootstrap.groovy file</p>
  
  <p>But i get the following error message</p>
  
  <pre><code>Caused by IllegalArgumentException: Parameter for constraint [size] of property [idCard] of class [class ni.sb.Client] must be a of type [groovy.lang.IntRange]
  </code></pre>
  
  <p>I need this property to be a String and have a fixed length</p>
  
  <p>I am following size constraints <a href="http://grails.org/doc/latest/ref/Constraints/size.html" rel="noreferrer">documentation</a> with no success</p>
  
  <p>Thanks, for your time</p>