diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-13 12:41:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-13 12:41:08 +0000 |
commit | 8b4406ef5d9d22f527fb124b335812dd9136532c (patch) | |
tree | bab37bd6a04bd027f6815b13678f3fc31b131eb3 /modules/taxonomy/taxonomy.module | |
parent | d6305a6616d4e9275ae61e82334285e9fb156a62 (diff) | |
download | brdo-8b4406ef5d9d22f527fb124b335812dd9136532c.tar.gz brdo-8b4406ef5d9d22f527fb124b335812dd9136532c.tar.bz2 |
- Patch #552436 by yched: validation of the number of values in field_default_validate().
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 11 |
1 files changed, 0 insertions, 11 deletions
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']])) { |