diff --git a/field_collection.module b/field_collection.module index a64b14c..2939e9f 100644 --- a/field_collection.module +++ b/field_collection.module @@ -1413,6 +1413,10 @@ function field_collection_field_widget_embed_validate($element, &$form_state, $c } } } + + // Attach field API validation of the embedded form. + field_attach_form_validate('field_collection_item', $field_collection_item, $element, $form_state); + // Handle a possible language change. if (field_collection_item_is_translatable()) { $handler = entity_translation_get_handler('field_collection_item', $field_collection_item); @@ -1421,9 +1425,6 @@ function field_collection_field_widget_embed_validate($element, &$form_state, $c $handler->entityFormLanguageWidgetSubmit($element, $element_form_state); } - // Attach field API validation of the embedded form. - field_attach_form_validate('field_collection_item', $field_collection_item, $element, $form_state); - // Now validate required elements if the entity is not empty. if (!field_collection_item_is_empty($field_collection_item) && !empty($element['#field_collection_required_elements'])) { foreach ($element['#field_collection_required_elements'] as &$elements) {