Sha256: 9ea234554a60a653c434cec342ad3379bafa5224d71ad4ec5d80c04730aec714

Contents?: true

Size: 349 Bytes

Versions: 26

Compression:

Stored size: 349 Bytes

Contents

module MCollective
  module Validator
    class Ipv6addressValidator
      require "ipaddr"

      def self.validate(validator)
        ip = IPAddr.new(validator)
        raise ValidatorError, "value should be an ipv6 adddress" unless ip.ipv6?
      rescue
        raise ValidatorError, "value should be an ipv6 address"
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
choria-mcorpc-support-2.26.5 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.26.4 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.26.3 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.26.2 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.26.1 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.26.0 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.25.3 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.25.2 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.25.1 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.25.0 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.24.4 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.24.3 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.24.2 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.24.1 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.24.0 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.23.3 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.23.2 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.23.1 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.23.0 lib/mcollective/validator/ipv6address_validator.rb
choria-mcorpc-support-2.23.0.pre lib/mcollective/validator/ipv6address_validator.rb