function js_injector_ctools_export_ui_form_validate in JS injector 7.2
Validation handler for the preset edit form.
1 string reference to 'js_injector_ctools_export_ui_form_validate'
- js_injector_ctools_export_ui.inc in plugins/
export_ui/ js_injector_ctools_export_ui.inc
File
- plugins/
export_ui/ js_injector_ctools_export_ui.inc, line 190
Code
function js_injector_ctools_export_ui_form_validate($form, &$form_state) {
// if preprocess is ticked, then ensure inline is not (they conflict)
if ($form_state['values']['preprocess'] == 1) {
$form_state['values']['inline'] = 0;
}
// Ensure the name field only contains URL safe characters.
if (preg_match('/[^A-Za-z0-9_\\-\\ ]+/', $form_state['values']['name'])) {
form_set_error('name', t('Illegal characters found in the friendly name, please remove them.'));
}
}