function view::validate

cis7 view::validate()
cle7 view::validate()
elmsmedia7 view::validate()
icor7 view::validate()
meedjum_blog7 view::validate()
mooc7 view::validate()

Make sure the view is completely valid.

Return value

TRUE if the view is valid; an array of error strings if it is not.


sites/all/modules/ulmus/views/includes/, line 2052
Provides the view object type and associated methods.


An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.


function validate() {

  $errors = array();
  $this->display_errors = NULL;

  $current_display = $this->current_display;
  foreach ($this->display as $id => $display) {
    if ($display->handler) {
      if (!empty($display->deleted)) {

      $result = $this->display[$id]->handler->validate();
      if (!empty($result) && is_array($result)) {
        $errors = array_merge($errors, $result);
        // Mark this display as having validation errors.
        $this->display_errors[$id] = TRUE;

  return $errors ? $errors : TRUE;