Exemple #1
0
 /**
  * Sets the scenario for currencyvalue elements to positiveValue for the validation of the price
  * using the rule in CurrencyValue
  * @return bool
  */
 protected function beforeValidate()
 {
     $this->sellPrice->setScenario('positiveValue');
     return parent::beforeValidate();
 }
 public function beforeValidate()
 {
     if ($this->getScenario() != 'searchModel') {
         $this->validateHtmlOnly();
     }
     return parent::beforeValidate();
 }