Model/CommonDetailModel.php
public function validateSection($data, $section) {
    $pass = true;
    if (!empty($this->sectionValidation[$section])) {
      $modelValidation = $this->validate;
      $this->validate = $this->sectionValidation[$section];
      $this->set($data);
      if (!$this->validates()) {
        $pass = false;
      }
      $this->validate = $modelValidation;
    }
    return $pass;
  }
public function validateSection($data, $section) {
    $pass = true;
    if (!empty($this->sectionValidation[$section])) {
      $modelValidation = $this->validate;
      $this->validate = $this->sectionValidation[$section];
      $this->set($data);
      if (!$this->validates()) {
        $pass = false;
      }
      $this->validate = $modelValidation;
    }
    return $pass;
  }
public function validateSection ( $ data , $ section ) { $ pass = true ; if ( ! empty ( $ this -> sectionValidation [ $ section ] ) ) { $ modelValidation = $ this -> validate ; $ this -> validate = $ this -> sectionValidation [ $ section ] ; $ this -> set ( $ data ) ; if ( ! $ this -> validates ( ) ) { $ pass = false ; } $ this -> validate = $ modelValidation ; } return $ pass ; }
Validates data for a given section.

@param array $data Record data.
@param string $section Name of the section.
@return boolean
Validates data for a given section .