Sha256: aa0ea4bfb567a88309a0da85bfdaef0ea7cee3ae920dd28e16a04f34d2d68433

Contents?: true

Size: 285 Bytes

Versions: 50

Compression:

Stored size: 285 Bytes

Contents

module MCollective
  module Validator
    class LengthValidator
      def self.validate(validator, length)
        if (validator.size > length) && (length > 0)
          raise ValidatorError, "Input string is longer than #{length} character(s)"
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 3 rubygems

Version Path
choria-mcorpc-support-2.22.1 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.22.0 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.21.1 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.21.0 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.8 lib/mcollective/validator/length_validator.rb
mcollective-client-2.12.5 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.7 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.6 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.5 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.4 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.3 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.2 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-2.20.0 lib/mcollective/validator/length_validator.rb
choria-mcorpc-support-0.0.1 lib/mcollective/validator/length_validator.rb
mcollective-client-2.12.4 lib/mcollective/validator/length_validator.rb
mcollective-client-2.12.3 lib/mcollective/validator/length_validator.rb
mcollective-client-2.12.1 lib/mcollective/validator/length_validator.rb
mcollective-client-2.12.0 lib/mcollective/validator/length_validator.rb
mcollective-client-2.10.6 lib/mcollective/validator/length_validator.rb
mcollective-client-2.11.4 lib/mcollective/validator/length_validator.rb