Sha256: 972e60bdd753f10b1c597f370afffe487d6a864a4ed408a9b80f3a97d393898a
Contents?: true
Size: 425 Bytes
Versions: 10
Compression:
Stored size: 425 Bytes
Contents
# frozen_string_literal: true module Grape module Validations module Validators class AllOrNoneOfValidator < MultipleParamsBase def validate_params!(params) keys = keys_in_common(params) return if keys.empty? || keys.length == all_keys.length raise Grape::Exceptions::Validation.new(params: all_keys, message: message(:all_or_none)) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems