Skip to content

Commit

Permalink
modifying the number validator to accept decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddrew committed Feb 12, 2016
1 parent 6294c01 commit d944cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/apipie/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def description
end

def self.validate(value)
value.to_s =~ /\A(0|[1-9]\d*)\Z$/
value.to_s =~ /\A[0-9]+([,.][0-9]+)?\Z$/
end
end

Expand Down

0 comments on commit d944cc3

Please sign in to comment.