function field_test_entity_nested_form_validate

Validate handler for field_test_entity_nested_form().

File

drupal/core/modules/field/tests/modules/field_test/field_test.entity.inc, line 262
Defines an entity type.

Code

function field_test_entity_nested_form_validate($form, &$form_state) {
  $entity_1 = entity_create('test_entity', $form_state['values']);
  field_attach_extract_form_values($entity_1, $form, $form_state);
  field_attach_form_validate($entity_1, $form, $form_state);
  $entity_2 = entity_create('test_entity', $form_state['values']['entity_2']);
  field_attach_extract_form_values($entity_2, $form['entity_2'], $form_state);
  field_attach_form_validate($entity_2, $form['entity_2'], $form_state);
}