You are here

function block_upload_get_validators in Block Upload 7

Returns validators array.

Return value

array List of validators.

2 calls to block_upload_get_validators()
block_upload_form in ./block_upload.module
Block upload form.
block_upload_plupload_form in ./block_upload.module
Returns plupload form for the form builder.

File

./block_upload.module, line 378
Block Upload module.

Code

function block_upload_get_validators($field_name, $field) {
  $validators = file_field_widget_upload_validators($field_name, $field);
  if ($field['widget']['module'] == 'image') {
    $validators['file_validate_is_image'] = array();
    $validators['file_validate_image_resolution'] = array(
      $field['settings']['max_resolution'],
      $field['settings']['min_resolution'],
    );
  }
  return $validators;
}