function content_copy_deploy_add_form_validate in Deploy - Content Staging 5
Same name and namespace in other branches
- 6 modules/content_copy_deploy/content_copy_deploy.pages.inc \content_copy_deploy_add_form_validate()
deploy content type form validation callback
File
- content_copy_deploy/
content_copy_deploy.module, line 94
Code
function content_copy_deploy_add_form_validate($form_id, $form_values) {
foreach ($form_values['content_type'] as $content_type) {
$result = db_query("select * from {deploy_plan_items} where module = 'content_copy' and pid = %d and data = '%s'", $form_values['pid'], $content_type);
if (db_num_rows($result)) {
form_set_error('content_type', t("Content type {$content_type} already exists in the deployment plan."));
}
}
}