diff --git a/components/select_image.inc b/components/select_image.inc
index b82249b..77b3fb8 100644
--- a/components/select_image.inc
+++ b/components/select_image.inc
@@ -92,6 +92,7 @@ function _webform_edit_select_image($component) {
       '#type' => 'textfield',
       '#title' => t('Legend'),
       '#default_value' => (isset($legends[$i]) ? $legends[$i] : ''),
+      '#element_validate'=>array('_webform_select_image_legend_validate'),
     );
   }
 
@@ -665,4 +666,4 @@ function _webform_select_image_get_options_list($items) {
     }
   }
   return $options;
-}
+}
\ No newline at end of file
diff --git a/webform_select_image.module b/webform_select_image.module
index 74ec4bf..0a8b3b1 100644
--- a/webform_select_image.module
+++ b/webform_select_image.module
@@ -105,6 +105,17 @@ function _webform_select_managed_file_validate($element, &$form_state, $form) {
 }
 
 /**
+ * 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.'));
+  }
+}
+
+/**
  * Replacement for theme_webform_element().
  * FIXME: Find a another way to just add "webform-component-select-image" class to element
  */
