You are here

function filefield_sources_field_validate in FileField Sources 7

Same name and namespace in other branches
  1. 8 filefield_sources.module \filefield_sources_field_validate()
  2. 6 filefield_sources.module \filefield_sources_field_validate()

An #element_validate function to run source validations.

1 string reference to 'filefield_sources_field_validate'
filefield_sources_element_info in ./filefield_sources.module
Implements hook_element_info().

File

./filefield_sources.module, line 249
Extend FileField to allow files from multiple sources.

Code

function filefield_sources_field_validate($element, &$form_state, $form) {

  // Do all processing as needed by each source.
  $sources = filefield_sources_info();
  foreach ($sources as $source) {
    if (isset($source['validate'])) {
      $function = $source['validate'];
      $function($element, $form_state, $form);
    }
  }
}