Skip to content

Instantly share code, notes, and snippets.

@olivermt
Created July 21, 2011 13:42
Show Gist options
  • Select an option

  • Save olivermt/1097208 to your computer and use it in GitHub Desktop.

Select an option

Save olivermt/1097208 to your computer and use it in GitHub Desktop.
custom validator
confirmField(validator: { val, obj ->
def linkedField = propertyName += "Confirm"
throw new RuntimeException("validating")
if(obj.properties[linkedField] != val) {
return ['confirmField.mismatch']
}
return true
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment