function linkit_field_profile_validate in Linkit 7.3
Validation callback; Only validate the profile field if linkit is enabled on the instance.
See also
linkit_form_field_ui_field_edit_form_alter()
1 string reference to 'linkit_field_profile_validate'
- linkit_form_field_ui_field_edit_form_alter in ./
linkit.field.inc - Implements hook_form_FIELD_UI_FIELD_EDIT_FORM_alter().
File
- ./
linkit.field.inc, line 181 - Implementation for Fields and Linkit.
Code
function linkit_field_profile_validate($element, &$form_state, $form) {
if (isset($form_state['values']['instance']['settings']['linkit']['enable']) && $form_state['values']['instance']['settings']['linkit']['enable']) {
if (empty($element['#value'])) {
form_error($element, t('You must select an profile.'));
}
}
}