? 761556-domain_cleanup_0.patch
? 774692-error.patch
? 785818-domain-batch.patch
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.134.2.21
diff -u -p -r1.134.2.21 domain.module
--- domain.module	27 Apr 2010 23:02:40 -0000	1.134.2.21
+++ domain.module	30 Apr 2010 15:23:16 -0000
@@ -2281,12 +2281,22 @@ function domain_batch_validate($values) 
   $batch = $values['domain_batch'];
   switch ($case) {
     case 'domain_root':
+      $errors = array();
       foreach ($batch as $key => $value) {
         $subdomain = strtolower(urlencode($value));
         $check = db_result(db_query("SELECT COUNT(domain_id) FROM {domain} WHERE subdomain = '%s' AND domain_id <> %d", $value, $key));
         if ($check > 0 || ($key > 0 && $value == variable_get('domain_root', ''))) {
           form_set_error('domain_batch', t('Each domain value must be unique.'));
         }
+        else {
+          $error = domain_valid_domain($value);
+          if (!empty($error)) {
+            $errors[] = $error;
+          }
+        }
+      }
+      if (!empty($errors)) {
+        form_set_error('domain_batch', theme('item_list', $errors));
       }
       break;
     case 'domain_sitename':
