add required attributes
force gid to be lowercase and validation