title: Grails Domain Validator
body: <p>I added a custom validator in domain class for a property. But whenever I run the unit test and run validate() method I get an error message that the property could not be recognized in the class. when I remove my custom validator everything is working properly.</p>
  
  <p>Thanks your your help!</p>
  
  <pre><code>class Region {
  int identifier
      BigDecimal leftUpLatitude
      BigDecimal leftUpLongitude
      BigDecimal rigthDownLatitude
      BigDecimal rigthDownLongitude
  
      static constraints = {  
          identifier unique:true, validator: {return identifier &gt; 0} 
          leftUpLatitude min:-90.00, max:90.00
          leftUpLongitude min:-180.00, max:180.00
          rigthDownLatitude min:-90.00, max:90.00
          rigthDownLongitude min:-180.00, max:180.00   
      }
  
      boolean isValidRegion(){
          if ((leftUpLatitude &gt; rigthDownLatitude) &amp;&amp; ( leftUpLongitude &lt; rigthDownLongitude))
              return true
          else
          return false    
      }
      String toString(){
          return "${identifier}"
      }
  }
  </code></pre>