Sha256: c1a0d3588992bc667f1fb6ade9ee15d495dedc23be3a4172ff7dd30118db5ce2
Contents?: true
Size: 678 Bytes
Versions: 53
Compression:
Stored size: 678 Bytes
Contents
module Kontena::Cli::Stacks::YAML::Validations::CustomValidators class CertificatesValidator < HashValidator::Validator::Base def initialize super('stacks_valid_certificates') end def validate(key, value, validations, errors) unless value.is_a?(Array) errors[key] = 'certificates must be array' return end certificate_item_validation = { 'subject' => 'string', 'name' => 'string', 'type' => 'string' } value.each do |certificate| HashValidator.validator_for(certificate_item_validation).validate(key, certificate, certificate_item_validation, errors) end end end end
Version data entries
53 entries across 53 versions & 2 rubygems