* Returns all the validators declared in [[rules()]]. * * This method differs from [[getActiveValidators()]] in that the latter * only returns the validators applicable to the current [[scenario]]. * * Because this method returns an ArrayObject object, you may * manipulate it by inserting or removing validators (useful in model behaviors). * For example, *
()
| 415 | * @return ArrayObject|\yii\validators\Validator[] all the validators declared in the model. |
| 416 | */ |
| 417 | public function getValidators() |
| 418 | { |
| 419 | if ($this->_validators === null) { |
| 420 | $this->_validators = $this->createValidators(); |
| 421 | } |
| 422 | |
| 423 | return $this->_validators; |
| 424 | } |
| 425 | |
| 426 | /** |
| 427 | * Returns the validators applicable to the current [[scenario]]. |
no test coverage detected