|
|
@ -1,6 +1,6 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
namespace yiiunit\framework\validators; |
|
|
|
namespace yiiunit\data\validators\models; |
|
|
|
|
|
|
|
|
|
|
|
use yii\base\Model; |
|
|
|
use yii\base\Model; |
|
|
|
|
|
|
|
|
|
|
@ -11,6 +11,25 @@ class FakedValidationModel extends Model |
|
|
|
{ |
|
|
|
{ |
|
|
|
private $attr = array(); |
|
|
|
private $attr = array(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public $val_attr_a; |
|
|
|
|
|
|
|
public $val_attr_b; |
|
|
|
|
|
|
|
public $val_attr_c; |
|
|
|
|
|
|
|
public $val_attr_d; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function rules() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return array( |
|
|
|
|
|
|
|
array('val_attr_a, val_attr_b', 'required', 'on' => 'reqTest'), |
|
|
|
|
|
|
|
array('val_attr_c', 'integer'), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function inlineVal($attribute, $params = array()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function __get($name) |
|
|
|
public function __get($name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (stripos($name, 'attr') === 0) { |
|
|
|
if (stripos($name, 'attr') === 0) { |