svc_alarm.cs_receiver is <= 9 digits so we don't perl barf trying to store a bigint...
authorIvan Kohler <ivan@freeside.biz>
Mon, 1 Jun 2015 18:31:40 +0000 (11:31 -0700)
committerIvan Kohler <ivan@freeside.biz>
Mon, 1 Jun 2015 18:31:40 +0000 (11:31 -0700)
FS/FS/svc_alarm.pm

index 1c1754d..1714109 100644 (file)
@@ -213,6 +213,10 @@ sub check {
   ;
   return $error if $error;
 
+  #really just an signed int, but to discourage storing other data (e.g. phone)
+  return 'CS Receiver must be 9 digits or less'
+    if $self->cs_receiver =~ /\d{10}/;
+
   $self->SUPER::check;
 }