From 8b4406ef5d9d22f527fb124b335812dd9136532c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 13 Dec 2009 12:41:08 +0000 Subject: - Patch #552436 by yched: validation of the number of values in field_default_validate(). --- modules/taxonomy/taxonomy.module | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index a15e7b4ba..e21728c9d 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1046,17 +1046,6 @@ function taxonomy_field_validate($obj_type, $object, $field, $instance, $langcod $allowed_values = taxonomy_allowed_values($field); $widget = field_info_widget_types($instance['widget']['type']); - // Check we don't exceed the allowed number of values for widgets with custom - // behavior for multiple values (taxonomy_autocomplete widget). - if ($widget['behaviors']['multiple values'] == FIELD_BEHAVIOR_CUSTOM && $field['cardinality'] >= 2) { - if (count($items) > $field['cardinality']) { - $errors[$field['field_name']][$langcode][0][] = array( - 'error' => 'taxonomy_term_illegal_value', - 'message' => t('%name: this field cannot hold more that @count values.', array('%name' => t($instance['label']), '@count' => $field['cardinality'])), - ); - } - } - foreach ($items as $delta => $item) { if (!empty($item['tid'])) { if (!isset($allowed_values[$item['tid']])) { -- cgit v1.2.3