function spaces_features_form_validate in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_admin.inc \spaces_features_form_validate()
- 6 spaces_admin.inc \spaces_features_form_validate()
- 6.2 spaces_admin.inc \spaces_features_form_validate()
Validate handler for spaces features form
1 call to spaces_features_form_validate()
- spaces_preset_form_validate in ./
spaces_admin.inc - Validation for the preset form.
File
- ./
spaces_admin.inc, line 606
Code
function spaces_features_form_validate($form_id, $form_values) {
$space = $form_values['space'];
$settings = spaces_settings();
if (isset($space->sid) && array_sum($form_values['features']) == 0) {
return form_set_error('', t('You must enable at least 1 feature for this group.'));
}
foreach ($form_values['settings'] as $setting => $value) {
$settings[$setting]
->validate($space, $value);
}
}