I have a Release model with medium and country columns (among others). There should not be releases that share identical
Release
medium
country
releases
You can pass a :scope parameter to your validator like this:
:scope
validates_uniqueness_of :medium, scope: :country
See the documentation for some more examples.