Skip to content

Commit

Permalink
Update rules.html.md
Browse files Browse the repository at this point in the history
I'm fairly sure the logic was wrong here, but please double check.
  • Loading branch information
fig authored Sep 3, 2020
1 parent d57eba0 commit fbf3798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docsite/source/rules.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class DistanceContract < Dry::Validation::Contract
end

rule(:kilometers, :miles) do
if key?(:kilometers) ^ key?(:miles)
if key?(:kilometers) && key?(:miles)
base.failure("must only contain one of: kilometers, miles")
end
end
Expand Down

0 comments on commit fbf3798

Please sign in to comment.