1 image_example.pages.inc image_example_style_form_validate($form, &$form_state)

Verifies that the user supplied an image with the form..

Related topics

File

modules/examples/image_example/image_example.pages.inc, line 70
Page/form showing image styles in use.

Code

function image_example_style_form_validate($form, &$form_state) {
  if (!isset($form_state['values']['image_example_image_fid']) || !is_numeric($form_state['values']['image_example_image_fid'])) {
    form_set_error('image_example_image_fid', t('Please select an image to upload.'));
  }
}