You are here

function filefield_sources_field_validate in FileField Sources 6

Same name and namespace in other branches
  1. 8 filefield_sources.module \filefield_sources_field_validate()
  2. 7 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_elements in ./filefield_sources.module
Implements hook_elements().

File

./filefield_sources.module, line 194
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);
    }
  }
}