You are here

function _video_preset_name_validate in Video 7.2

Same name and namespace in other branches
  1. 7 modules/video_ui/video.preset.inc \_video_preset_name_validate()

Validation for the preset form.

1 string reference to '_video_preset_name_validate'
video_preset_form in modules/video_ui/video.preset.inc
Preset form builder.

File

modules/video_ui/video.preset.inc, line 724
Administrative interface for maintaining video presets.

Code

function _video_preset_name_validate($element, $form_state) {
  $oldname = isset($form_state['preset']) ? $form_state['preset']['name'] : '';
  $error = video_validate_preset_name($form_state['values']['name'], $oldname);
  if ($error) {
    form_set_error('name', $error);
  }
}