Skip to content

Commit

Permalink
Fixed array and string validators.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaHydrae committed Jan 22, 2015
1 parent b212c02 commit 967990b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/errapi/validations/array_length.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def validate value, context, options = {}
CHECKS.each_pair do |key,check|
next unless check_value = @constraints[key]
next if actual_length.send check, check_value
context.add_error cause: CAUSES[key], constraint_value: check_value, constrained_value: actual_length
context.add_error cause: CAUSES[key], check_value: check_value, checked_value: actual_length
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/errapi/validations/string_length.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def validate value, context, options = {}
CHECKS.each_pair do |key,check|
next unless check_value = @constraints[key]
next if actual_length.send check, check_value
context.add_error cause: CAUSES[key], constraint_value: check_value, constrained_value: actual_length
context.add_error cause: CAUSES[key], check_value: check_value, checked_value: actual_length
end
end

Expand Down

0 comments on commit 967990b

Please sign in to comment.