function party_default_attached_entity_form_validate in Party 8.2
Same name and namespace in other branches
- 7 party.module \party_default_attached_entity_form_validate()
The default attached entity form validate callback.
Parameters
$form: The whole form so far
$form_state: The form state
$attached_entity: The attached entity this form is for
$party: The party the $attached entity is attached to
File
- ./
party.module, line 1454 - Provides a generic CRM party entity.
Code
function party_default_attached_entity_form_validate($form, &$form_state, &$attached_entity, $party) {
// Validate fields.
$pseudo_entity = (object) $form_state['values'][$attached_entity
->hash()];
$psuedo_entity->type = $attached_entity
->getEntityBundle();
field_attach_form_validate($attached_entity
->getEntityType(), $pseudo_entity, $form[$attached_entity
->hash()], $form_state);
}