Skip to content

Commit

Permalink
CL-13291 trimmed '-' from real element for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhiraj Mishra authored and Cardds committed Nov 20, 2018
1 parent b9f7a61 commit 039b808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/baldr/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def check_number(r, element)
end

def check_real(r, element)
value = element.to_s.tr('.','')
value = element.to_s.tr('.-','')
if r[:max] && value.length > r[:max]
raise Baldr::Error::ValidationError, "#{r[:id]} is too long: #{value.length} characters, maximum #{r[:max]}"
end
Expand Down

0 comments on commit 039b808

Please sign in to comment.