git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1844 7926756e-e54e-46e6-9721-ed318f58905epull/6827/head
parent
6bcc476bcb
commit
d1f0ff79ad
@ -0,0 +1,14 @@ |
||||
module CostQuery::Validation |
||||
module Integers |
||||
def validate_integers(values = []) |
||||
values_passed = true |
||||
values.all? do |val| |
||||
if val.to_i.to_s != val.to_s |
||||
values_passed = false |
||||
errors << "\'#{val}\' is not a valid date!" |
||||
end |
||||
end |
||||
values_passed |
||||
end |
||||
end |
||||
end |
@ -1,7 +0,0 @@ |
||||
module CostQuery::Validation |
||||
module Numbers |
||||
def validate_numbers(values = []) |
||||
raise NotImplementedError, "Haven't done number validation just yet!" |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue