function field_test_entity_nested_form_validate in Drupal 7
Validate handler for field_test_entity_nested_form().
File
- modules/
field/ tests/ field_test.entity.inc, line 461 - Defines an entity type.
Code
function field_test_entity_nested_form_validate($form, &$form_state) {
$entity_1 = (object) $form_state['values'];
field_attach_form_validate('test_entity', $entity_1, $form, $form_state);
$entity_2 = (object) $form_state['values']['entity_2'];
field_attach_form_validate('test_entity', $entity_2, $form['entity_2'], $form_state);
}