function linkit_profiles_form_validate in Linkit 7.3
Linkit profile validate callback.
See also
File
- plugins/
export_ui/ linkit_profiles.inc, line 77
Code
function linkit_profiles_form_validate(&$form, &$form_state) {
// If the profile type is field, then insert plugin is required.
if ($form_state['values']['profile_type'] == LINKIT_PROFILE_TYPE_FIELD && empty($form_state['values']['data']['insert_plugin']['plugin'])) {
form_set_error('data][insert_plugin][plugin', t('You have to select a insert plugin for profiles used with fields.'));
}
// If the profile type is menu, then button text is required.
if ($form_state['values']['profile_type'] == LINKIT_PROFILE_TYPE_MENU && empty($form_state['values']['data']['button_text'])) {
form_set_error('data][profile_type][button_text', t('You have to provide the button text for profiles used with menu links.'));
}
}