function textimage_settings_form_validate in Textimage 7.2
Same name and namespace in other branches
- 5.2 textimage_admin.inc \textimage_settings_form_validate()
- 5 textimage.module \textimage_settings_form_validate()
- 6.2 textimage_admin.inc \textimage_settings_form_validate()
Todo.
File
- ./
textimage.admin.inc, line 47 - Textimage admin page callback
Code
function textimage_settings_form_validate($form, &$form_state) {
// Check for valid fonts path.
if ($form_state['values']['textimage_fonts_path'] != "" && !is_dir(rtrim($form_state['values']['textimage_fonts_path'], '\\/'))) {
form_set_error('textimage_fonts_path', t('The fonts path "%path" is invalid.', array(
'%path' => $form_state['values']['textimage_fonts_path'],
)));
}
// Check for valid backgorund images path.
if ($form_state['values']['textimage_images_path'] != "" && !is_dir(rtrim($form_state['values']['textimage_images_path'], '\\/'))) {
form_set_error('textimage_images_path', t('The background images path "%path" is invalid.', array(
'%path' => $form_state['values']['textimage_fonts_path'],
)));
}
}