function upload_element_element_validate in Upload element 6
The custom validation required for files that are marked as deleted, but are required.
Parameters
array $element:
array $form_state:
1 string reference to 'upload_element_element_validate'
- upload_element_elements in ./
upload_element.module - Implementation of hook_elements().
File
- ./
upload_element.module, line 269 - A module that provides two new elements to the FAPI for file handling.
Code
function upload_element_element_validate($element, &$form_state) {
if ($element['#required'] && !_upload_element_parse_value($element)) {
form_error($element, t('!name field is required.', array(
'!name' => $element['#title'],
)));
}
}