CRM-14798 - Allow editing case-type names even if malformed
[civicrm-core.git] / js / angular-crmCaseType.js
index 8f579356b1ea7bde5d2e85f080814a62b97918c9..fa68c64bf63003dc45ed5b4f9d4807718e765b58 100644 (file)
       }
     };
 
+    $scope.isValidName = function(name) {
+      return !name || name.match(/^[a-zA-Z0-9_]+$/);
+    };
+
     $scope.getWorkflowName = function(activitySet) {
       var result = 'Unknown';
       _.each($scope.workflows, function(value, key) {