If it’s just for those specific two footprints, you can just right click on the DRC message and then select “Exclude this Violation”. No need for rules at all. KiCad maintains a list of these excluded violations, so you can revisit or modify them later.
Below a screenshot form ERC, which uses the same mechanism as DRC.