function _brightcove_field_video_widget_validate in Brightcove Video Connect 7.5
Element validate callback for brightcove_field_field_instance_settings_form.
1 string reference to '_brightcove_field_video_widget_validate'
- brightcove_field_field_instance_settings_form in brightcove_field/
brightcove_field.module - Implements hook_field_settings_form().
File
- brightcove_field/
brightcove_field.module, line 429 - Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function _brightcove_field_video_widget_validate($element, &$form_state) {
// If the default is selected check if there is a default player is set.
if (empty($form_state['input']['instance']['settings']['brightcove_player'])) {
if (is_null(variable_get('brightcove_player_default', NULL))) {
form_error($element, t('A default player must be selected to use global settings for the Brightcove player on the !link page.', array(
'!link' => l(t('Brightcove settings'), 'admin/config/media/brightcove/players'),
)));
}
}
}