diff options
author | ivan <ivan> | 2010-01-26 08:35:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-01-26 08:35:43 +0000 |
commit | 046395d0a66db2f057c80768e01ae0f5b06bc555 (patch) | |
tree | 2a632b6ac08141ccb9f3552ea026e592784df947 /FS/FS/part_export | |
parent | a175f7b143b3a8634fa54c9ce3e4a3530dd360e3 (diff) |
svc_pbx.title uniqueness (kludgy) and force to alphanumeric+space and 19 char max when using thirdlane (conservative guess for 1st pass implementation), RT#7051
Diffstat (limited to 'FS/FS/part_export')
-rw-r--r-- | FS/FS/part_export/thirdlane.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/part_export/thirdlane.pm b/FS/FS/part_export/thirdlane.pm index cbcf98a..196177e 100644 --- a/FS/FS/part_export/thirdlane.pm +++ b/FS/FS/part_export/thirdlane.pm @@ -41,6 +41,12 @@ sub _export_insert { if ( $svc_x->isa('FS::svc_pbx') ) { + return 'Name must be 19 characters or less (thirdlane restriction?)' + if length($svc_x->title) > 19; + + return 'Name must consist of alphanumerics and spaces only (thirdlane restriction?)' + unless $svc_x->title =~ /^[\w\s]+$/; + my $tenant = { 'tenant' => $svc_x->title, 'maxusers' => $svc_x->max_extensions, |