class Rpush::Client::ActiveModel::Apns::DeviceTokenFormatValidator

Public Instance Methods

validate(record) click to toggle source
# File lib/rpush/client/active_model/apns/device_token_format_validator.rb, line 6
def validate(record)
  return if record.device_token =~ /^[a-z0-9]\w+$/i
  record.errors[:device_token] << "is invalid"
end