Sha256: 1eb854d16e84aecd2ec9a5e2021cbe21c39f5f1ab9927a586458f0b60bdcf005
Contents?: true
Size: 399 Bytes
Versions: 49
Compression:
Stored size: 399 Bytes
Contents
module Rpush module Client module ActiveModel class PayloadDataSizeValidator < ::ActiveModel::Validator def validate(record) limit = options[:limit] || 1024 return unless record.data && record.payload_data_size > limit record.errors[:base] << "Notification payload data cannot be larger than #{limit} bytes." end end end end end
Version data entries
49 entries across 49 versions & 2 rubygems