added validate_uniqueness helper