function hosting_platform_validate in Hosting 5
Same name and namespace in other branches
- 6.2 platform/hosting_platform.module \hosting_platform_validate()
- 7.4 platform/hosting_platform.module \hosting_platform_validate()
- 7.3 platform/hosting_platform.module \hosting_platform_validate()
Implementation of hook_validate()
File
- platform/
hosting_platform.module, line 189 - Platform node type definition
Code
function hosting_platform_validate($node, &$form) {
if ($result = db_fetch_object(db_query("SELECT n.title AS name FROM {hosting_platform} AS h INNER JOIN {node} AS n ON n.nid = h.nid WHERE publish_path = '%s'", $node->publish_path))) {
form_set_error('publish_path', t('Path already defined in platform %name', array(
'%name' => $result->name,
)));
}
}