--- <html>select_image.inc (<b>f57868e</b>)</html>
+++ <html><b>Current File</b></html>
@@ -92,6 +92,7 @@
       '#type' => 'textfield',
       '#title' => t('Legend'),
       '#default_value' => (isset($legends[$i]) ? $legends[$i] : ''),
+      '#element_validate'=>array('_webform_select_image_legend_validate'),
     );
   }
 
@@ -667,3 +668,14 @@
   }
   return $options;
 }
+
+/**
+ * Validate image legend
+ */
+function _webform_select_image_legend_validate($element, &$form_state){
+  $value = $element['#value'];
+  $regex = "#[/|,]+$#";
+  if (!empty($value) && preg_match($regex, $value)) {
+    form_error($element, t($element['#title'] . ' should not content special character.'));
+  }
+}
\ No newline at end of file
