Added mcollective 2.3.1 package
[packages/trusty/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