function spaces_og_nodeform_validate in Spaces 7.3
Same name and namespace in other branches
- 6.3 spaces_og/spaces_og.pages.inc \spaces_og_nodeform_validate()
- 6 spaces_og/spaces_og.module \spaces_og_nodeform_validate()
- 6.2 spaces_og/spaces_og.module \spaces_og_nodeform_validate()
- 7 spaces_og/spaces_og.pages.inc \spaces_og_nodeform_validate()
Element validator for group targeting selector.
File
- spaces_og/
spaces_og.pages.inc, line 192
Code
function spaces_og_nodeform_validate($element, &$form_state) {
if ($element['#value'] == 0) {
if ($group_types = og_get_types('group')) {
$typename = node_type_get_name(array_shift($group_types));
}
form_error($element, t('Please choose a !typename to post to.', array(
'!typename' => strtolower($typename),
)));
}
}