Sha256: 60f63dc018c4a53ec60998b3948ad824bed5ee3b70fb009a48b15c2ee20651fa
Contents?: true
Size: 358 Bytes
Versions: 3
Compression:
Stored size: 358 Bytes
Contents
require 'grape/validations/validators/multiple_params_base' module Grape module Validations class AtLeastOneOfValidator < MultipleParamsBase def validate_params!(params) return unless keys_in_common(params).empty? raise Grape::Exceptions::Validation, params: all_keys, message: message(:at_least_one) end end end end
Version data entries
3 entries across 3 versions & 2 rubygems