text: Q:
  
  Grails define custom error message for command object
  
  I am writing a Grails (2.3.3 currently) application and have created a validateable command object similar to the following:
  @Validateable
  class MyCustomCommand {
    String name
  
    static constraints = {
      name blank: false
    }
  }
  
  In my i18n/messages.properties file I defined the following properties to override the default error messages. 
  MyCustomCommand.name.blank=Name must be provided.
  MyCustomCommand.name.null=Name must be provided.
  
  Which per the Grails documentation should be of the format [Class Name].[Property Name].[Constraint Code] as I have done. When I run my application if I leave the value blank I still get the default message for a null property.
  I also tried following the example of the default messages and defining them a follows, but still get the default message.
  MyCustomCommand.name.blank.message=Name must be provided.
  MyCustomCommand.name.null.message=Name must be provided.
  
  I am assuming that I am missing something simple here, but have yet to stumble upon what. Any suggestions on what I am doing incorrectly?
  
  A:
  
  It is simple indeed. Message should look like:
  myCustomCommand.name.blank=Name must be provided.
  myCustomCommand.name.nullable=Name must be provided.
  
  //className.propertyName.blank (camelCase with first letter of class name lower)
  
  