This bug affects Grails 1.3.7 and earlier only. In later versions, a DSLD handles the constraints language and so this is not a problem.
There is a regression in the constraints DSL. Pre-2.0, it is only partially supported in that constraints fields would show up where appropriate, but there is no support for writing the actual constraint.
The regression is that as soon as parentheses are added to make the field reference a method call, underlines appear.
Here is an example. No underlines:
Here, name is underlined:
The reason is that the parse tree looks different in the two situations. In the top, name is resolved to a local variable reference. And since we stuff the variable scope with all the proper constraints, this works out. In the bottom, name is not a variable, and so we look for references in the declaration. The result is the name field declaration, which is not allowed to be referenced in a static context and hence it is underlined.