function _filefield_upload_requirements in FileField 6.2
Retrieve a list of upload requirement strings for the various upload restrictions that this module and possible extensions provide.
1 call to _filefield_upload_requirements()
- filefield_file_upload_form in ./
filefield.widget.inc - The filefield widget for not (yet) existing files.
File
- ./
filefield.widget.inc, line 249 - FileField: Defines a CCK file field type.
Code
function _filefield_upload_requirements($field, $widget, $items) {
$validator_info = _filefield_validator_info($field, $widget, $items);
$messages = array();
$errors = array();
foreach ($validator_info as $validator_function => $info) {
$messages[] = $info['requirement message'];
if (isset($info['upload possible']) && $info['upload possible'] == FALSE) {
$errors[] = $info['requirement message'];
}
}
return array(
'messages' => empty($errors) ? $messages : $errors,
'upload possible' => empty($errors),
);
}