function _video_s3_fsadmin_validate in Video 6.4
Same name and namespace in other branches
- 6.5 plugins/video_s3/filesystem/video_s3.inc \_video_s3_fsadmin_validate()
Handle required fields that are only required when video_s3 is the selected file system.
Parameters
array $element:
array $form_state:
1 string reference to '_video_s3_fsadmin_validate'
- video_s3::admin_settings in plugins/
video_s3/ filesystem/ video_s3.inc
File
- plugins/
video_s3/ filesystem/ video_s3.inc, line 309
Code
function _video_s3_fsadmin_validate($element, $form_state) {
if ($form_state['values']['vid_filesystem'] != 'video_s3') {
return;
}
$key = end($element['#parents']);
$val = $form_state['values'][$key];
if (empty($val)) {
form_error($element, t('!name field is required.', array(
'!name' => $element['#title'],
)));
}
}