Exemplo n.º 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();
 }
Exemplo n.º 2
0
 public function beforeValidate()
 {
     if ($this->getScenario() != 'searchModel') {
         $this->validateHtmlOnly();
     }
     return parent::beforeValidate();
 }