I just solved this by creating a custom validation. Silly me.
validates_with_method :check_uniqueness_of_score
def check_uniqueness_of_score
!(Score.all(pageant_id: self.pageant_id, candidate_id: self.candidate_id,
category_id: self.category_id, judge_id: self.judge_id).count > 0)
end