title: Grails Problem with custom error messages
body: <p>I am currently trying to specify custom error messages in grails for the default constraints but so far all I get back is the default error message.</p>
  
  <p>I know that I have to edit the grails-app/i18n/messages.properties file</p>
  
  <p>If I change the following default error codes message, it will correctly display the new error message</p>
  
  <pre><code>default.blank.message=Property [{0}] of class [{1}] cannot be blank
  </code></pre>
  
  <p>However, this is not what I am trying to do. I need more granular error reporting and have more than one field that can be blank etc. What I would like to be able to do would be, display custom messages for each field in a class</p>
  
  <pre><code>package com.mycompany.myapp
  
  class Test{
  
   String name
   def constraints = {
   name(nullable:false, blank:false)
   }
  }
  </code></pre>
  
  <p>(following codes appended to end of messages.properties)</p>
  
  <pre><code>test.name.blank=Name cannot be blank
  test.name.nullable=Name cannot be nullable
  </code></pre>
  
  <p>According to the grails documentation this should work correctly, either with or without the package name - className.propertyName.blank</p>
  
  <p>grails.org/doc/latest/ (constraints section) &amp; (section 7.4 - validation &amp; internationalization)</p>
  
  <p>I have tried all comnbinations that I can think of, but it always displays the custom message</p>
  
  <p>I have also tried installing the grails i18n templates plugin</p>
  
  <p><a href="http://www.grails.org/I18n+Templates+Plugin" rel="noreferrer">http://www.grails.org/I18n+Templates+Plugin</a></p>
  
  <p>which generated the error codes automatically for me. I appended the new error codes to the end of the existing messages.properties file but I still get the default error messages.</p>
  
  <p>However, there was something different with the error codes that were generated by the plugin.</p>
  
  <p>instead of the format specified in the grails doc - test.name.null=......, it automatically generated test.name.null.error=Custom Message</p>
  
  <p>I have also tried deleting the default error messages completely, but they are still displayed</p>
  
  <p>If anyone has experienced this issue before, I would appreciate any help that anyone can give me</p>
  
  <p>Thanks in advance</p>