function _video_s3_fsadmin_validate in Video 6.5
Same name and namespace in other branches
- 6.4 plugins/video_s3/filesystem/video_s3.inc \_video_s3_fsadmin_validate()
Handle required fields that are only required when S3 is the file system.
Parameters
$element: Element to validate
$form_state: 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 394 - Class file used to store videos in Amazon S3.
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'],
)));
}
}