function privatemsg_new_folder_form_validate in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_new_folder_form_validate()
File
- ./
privatemsg.module, line 1228
Code
function privatemsg_new_folder_form_validate($form_id, $form_values) {
global $user;
if (!empty($form_values['name']) && db_result(db_query("SELECT name FROM {privatemsg_folder} WHERE name = '%s' AND uid = %d", $form_values['name'], $user->uid))) {
form_set_error('name', t('A folder with this name already exists.'));
}
if (empty($form_values['name'])) {
form_set_error('name', t('You must specify a name for the new folder.'));
}
}