A piece of script means a lot of things:
def u= new foxgem.test1.User1(name:'')Here, there is a blank constraint on name property of foxgem.test1.User1. But the note is not necessary to Domain Class, so the second assert statement in the script will failed when foxgem.test1.User1 is a domain class.
assert u.validate() == false
u.name='foxgem'
assert u.validate() == false
u.clearErrors()
assert u.validate() == true
This is very confusing, I hope this will be imporved in the future of Grails.