I have been writing a custom constraint, but it was obvious that the validate method was not getting called when null or blank values were passed to it.
I had to resort to digging through the code to see if I could work out why this was. I found out that I could get the validate method to fire by having these two lines in my constraint:
def skipBlankValues = false
def skipNullValues = false
If this could be mentioned in the docs it would have saved me a lot of time!
Seems like a good idea. Will do.