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
mcollective-client-2.11.3 lib/mcollective/validator/length_validator.rb
mcollective-client-2.11.2 lib/mcollective/validator/length_validator.rb
mcollective-client-2.11.1 lib/mcollective/validator/length_validator.rb
mcollective-client-2.11.0 lib/mcollective/validator/length_validator.rb
mcollective-client-2.10.4 lib/mcollective/validator/length_validator.rb
mcollective-client-2.10.3 lib/mcollective/validator/length_validator.rb
mcollective-client-2.10.2 lib/mcollective/validator/length_validator.rb
mcollective-client-2.10.1 lib/mcollective/validator/length_validator.rb
mcollective-client-2.10.0 lib/mcollective/validator/length_validator.rb
mcollective-client-2.8.7 lib/mcollective/validator/length_validator.rb
mcollective-client-2.8.5 lib/mcollective/validator/length_validator.rb
mcollective-client-2.8.8 lib/mcollective/validator/length_validator.rb
mcollective-client-2.8.6 lib/mcollective/validator/length_validator.rb
mcollective-client-2.9.1 lib/mcollective/validator/length_validator.rb
mcollective-client-2.9.0 lib/mcollective/validator/length_validator.rb
mcollective-client-2.8.9 lib/mcollective/validator/length_validator.rb
dtk-node-agent-0.7.7 mcollective_additions/plugins/v2.2/validator/length_validator.rb
dtk-node-agent-0.7.6 mcollective_additions/plugins/v2.2/validator/length_validator.rb
dtk-node-agent-0.7.5 mcollective_additions/plugins/v2.2/validator/length_validator.rb
mcollective-client-2.8.4 lib/mcollective/validator/length_validator.rb