Commit 176b5844 authored by quicksketch's avatar quicksketch

#627124 by emelfe: Use $form['#field_info'] for required file validation.

parent 9afe207a
......@@ -506,8 +506,7 @@ function theme_filefield_widget_file($element) {
* properly supported on file fields by Drupal core, so we do this manually.
*/
function filefield_node_form_validate($form, &$form_state) {
$type = content_types($form['type']['#value']);
foreach ($type['fields'] as $field_name => $field) {
foreach ($form['#field_info'] as $field_name => $field) {
if (!(in_array($field['module'], array('imagefield', 'filefield')))) continue;
$empty = $field['module'] .'_content_is_empty';
$valid = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment