diff --git a/lib/acts_as_paranoid/validations.rb b/lib/acts_as_paranoid/validations.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_paranoid/validations.rb
+++ b/lib/acts_as_paranoid/validations.rb
@@ -79,7 +79,12 @@ module ActsAsParanoid
 
     module ClassMethods
       def validates_uniqueness_of_without_deleted(*attr_names)
-        validates_with UniquenessWithoutDeletedValidator[ActiveRecord::VERSION::MAJOR], _merge_attributes(attr_names)
+        case ActiveRecord::VERSION::MAJOR
+        when 'V4', 'V5'
+          validates_with UniquenessWithoutDeletedValidator[ActiveRecord::VERSION::MAJOR], _merge_attributes(attr_names)
+        when '6'
+          validates_with UniquenessWithoutDeletedValidator['V5'], _merge_attributes(attr_names)
+        end
       end
     end
   end
Map Rails 6 to "V5" validator class