You will need to write your own custom validator implementation for this. Lucky for you Grails exposes a way to do so. The documentation for validation shows some basic implementations and the last one is most applicable to your situation since you will need to reference other properties of the instance.
Your implementation may look something like this (just off the top of my head):
static constraints = {
member validator: { val, obj ->
if ((obj.type == 1) || (obj.type == 2)) {
if (ArticleRelation.countByMemberAndType(val, obj.type) > 0) return ['myNotUniqueErrorKey']
}
}
}