You are here

function emfield_settings_validate in Embedded Media Field 6.3

Same name in this branch
  1. 6.3 emfield.admin.inc \emfield_settings_validate()
  2. 6.3 deprecated/emfield-deprecated.admin.inc \emfield_settings_validate()
Same name and namespace in other branches
  1. 6 emfield.admin.inc \emfield_settings_validate()
  2. 6.2 emfield.admin.inc \emfield_settings_validate()

Validation for emfield_settings form, callback for /admin/content/emfield. Ensure we have a valid SWFObject path.

2 string references to 'emfield_settings_validate'
emfield_settings in ./emfield.admin.inc
Callback for admin/content/emfield.
emfield_settings in deprecated/emfield-deprecated.admin.inc
Callback for admin/content/emfield.

File

deprecated/emfield-deprecated.admin.inc, line 180
The administrative settings page.

Code

function emfield_settings_validate($form, $form_state) {
  if ($form_state['values']['emfield_swfobject'] && $form_state['values']['emfield_swfobject_location']) {
    if (!file_exists($form_state['values']['emfield_swfobject_location'])) {
      form_set_error('emfield_swfobject_location', t('The SWFObject %file file was not found at that location. Please specify a valid location.', array(
        '%file' => $form_state['values']['emfield_swfobject_location'],
      )));
    }
  }
}