class MCollective::Validator::LengthValidator

Public Class Methods

validate(validator, length) click to toggle source
# File lib/mcollective/validator/length_validator.rb, line 4
def self.validate(validator, length)
  if (validator.size > length) && (length > 0)
    raise ValidatorError, "Input string is longer than #{length} character(s)"
  end
end