Module: CommandTower::Messaging::Endpoints::Validators::Push
- Defined in:
- app/services/command_tower/messaging/endpoints/validators/push.rb
Class Method Summary collapse
Class Method Details
.validate!(address) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/services/command_tower/messaging/endpoints/validators/push.rb', line 10 def validate!(address) token = address.to_s.strip raise ValidationError, "push token must be present" if token.empty? raise ValidationError, "push token is too short" if token.length < 8 Result.new( normalized_address: token, masked_display_value: "Device registered", ) end |