Sha256: 80b01bf73a2bed7526cc4248f65740a3c05f5569183d16b2ae6953708d84bfae
Contents?: true
Size: 332 Bytes
Versions: 2
Compression:
Stored size: 332 Bytes
Contents
module Rpush class RegistrationIdsCountValidator < ActiveModel::Validator def validate(record) limit = options[:limit] || 100 if record.registration_ids && record.registration_ids.size > limit record.errors[:base] << "Number of registration_ids cannot be larger than #{limit}." end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpush-1.0.0-java | lib/rpush/registration_ids_count_validator.rb |
rpush-1.0.0 | lib/rpush/registration_ids_count_validator.rb |