|
|
|
@ -91,9 +91,11 @@ class ExistValidatorTest extends DatabaseTestCase
|
|
|
|
|
$this->assertTrue($m->hasErrors('a_field')); |
|
|
|
|
// check array |
|
|
|
|
$val = new ExistValidator(['targetAttribute' => 'ref']); |
|
|
|
|
$val->allowArray = true; |
|
|
|
|
$m = new ValidatorTestRefModel(); |
|
|
|
|
$m->test_val = [2, 3, 4, 5]; |
|
|
|
|
$val->validateAttribute($m, 'test_val'); |
|
|
|
|
var_dump($m->errors); |
|
|
|
|
$this->assertFalse($m->hasErrors('test_val')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|