def validate_ipaddr key, value, opts
      if opts[:ipaddr] == true && value.kind_of?(String)
        value = IPAddr.new(value)
      end
      value.to_s
    end
def validate_ipaddr key, value, opts
      if opts[:ipaddr] == true && value.kind_of?(String)
        value = IPAddr.new(value)
      end
      value.to_s
    end
Validates specified `value` with `ipaddr` field.
 @param [Object] key Value to validate.
 @param [Object] value Value to validate.
 @param [Hash] opts opts with optional ipaddr field.
 @return [String] Updated `value`