Sha256: 70f2d2b338eeeb82e210610956bfacbb7367f30999d965566255293a15d51d3e
Contents?: true
Size: 414 Bytes
Versions: 49
Compression:
Stored size: 414 Bytes
Contents
module Rpush module Client module ActiveModel class RegistrationIdsCountValidator < ::ActiveModel::Validator def validate(record) limit = options[:limit] || 100 return unless record.registration_ids && record.registration_ids.size > limit record.errors[:base] << "Number of registration_ids cannot be larger than #{limit}." end end end end end
Version data entries
49 entries across 49 versions & 2 rubygems