function party_primary_fields_source_table_validate in Party 7
Validation handler for the add source button.
1 string reference to 'party_primary_fields_source_table_validate'
- PartyPrimaryFields::sourceForm in includes/
party.primary_fields.inc - Set up a source form under the given element.
File
- ./
party.admin.inc, line 253 - Admin page callback file for the party module.
Code
function party_primary_fields_source_table_validate(&$form, &$form_state) {
// Get our element.
$parents = array_slice($form_state['triggering_element']['#array_parents'], 0, -2);
$element = drupal_array_get_nested_value($form, $parents);
// Check we had a source selected..
if (empty($form_state['values']['add_source_property'])) {
form_error($element['add_source']['add_source_property'], t('You must select a property to add.'));
}
}