function spaces_og_nodeform_validate in Spaces 6
Same name and namespace in other branches
- 6.3 spaces_og/spaces_og.pages.inc \spaces_og_nodeform_validate()
- 6.2 spaces_og/spaces_og.module \spaces_og_nodeform_validate()
- 7.3 spaces_og/spaces_og.pages.inc \spaces_og_nodeform_validate()
- 7 spaces_og/spaces_og.pages.inc \spaces_og_nodeform_validate()
Element validator for group targeting selector.
1 string reference to 'spaces_og_nodeform_validate'
- _spaces_og_form_alter_node in spaces_og/
spaces_og.module - Group-enabled node form_alter()
File
- spaces_og/
spaces_og.module, line 776
Code
function spaces_og_nodeform_validate($element, &$form_state) {
if ($element['#value'] == 0) {
// Retrieve the content type label
$types = node_get_types();
if (!empty($types['group'])) {
$typename = $types['group']->name;
}
form_error($element, t('Please choose a !typename to post to.', array(
'!typename' => strtolower($typename),
)));
}
}