I've verified that keystone CLI also validates that it's in the hex format.  I don't really know if the API accepts an ID other than a valid UUID, but since CLI doesn't accept 'id' as an input to create a project, I think that's a reasonable assumption to make.  That you validate against a valid UUID in a hex format, and name the method as such.