Merge pull request #12774 from exAspArk/fix_uniqueness_on_relation

Fix validation on uniqueness
Conflicts:
	activerecord/CHANGELOG.md