title: Add constraints to properties of Groovy class (not Grails domain class!)
body: <p><br>
  How can we add some common constraints (i.e. maxLength, nullable) to a property of a Groovy class? I know we can do it at Grails domain class, but is it possible if that is a Groovy class (I use it as a DTO class for my Grails project)?<br>
  Thank you so much!</p>