78ecb939d8937db8926650cf655bdb4d3d57ae0d
[packages/precise/mcollective.git] / plugins / mcollective / validator / length_validator.rb
1 module MCollective
2   module Validator
3     class LengthValidator
4       def self.validate(validator, length)
5         if (validator.size > length) && (length > 0)
6           raise ValidatorError, "Input string is longer than #{length} character(s)"
7         end
8       end
9     end
10   end
11 end