You are here

function space_setting_home::validate in Spaces 5.2

Same name and namespace in other branches
  1. 6 spaces.module \space_setting_home::validate()
  2. 6.2 spaces.spaces.inc \space_setting_home::validate()

Overrides space_setting::validate

File

./spaces.module, line 408

Class

space_setting_home
Provides a homepage setting for each space.

Code

function validate($space, $value) {

  // Exclude space "prototypes" (like that used for the preset form)
  if ($space->sid) {
    if (!$value && is_array($space->features) && array_sum($space->features) != 0) {
      form_set_error('settings][' . $this->id, t('You must select a homepage for this space.'));
    }
  }
}