Yii2 Bootstrap 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
589 B

<?php
namespace yiiunit\extensions\bootstrap\data;
use yii\base\Model;
/**
* Class Singer
*
* @author Daniel Gomez Pan <pana_1990@hotmail.com>
*/
class Singer extends Model
{
public $firstName;
public $lastName;
public $test;
public function rules()
{
return [
[['lastName'], 'default', 'value' => 'Lennon'],
[['lastName'], 'required'],
[['underscore_style'], 'yii\captcha\CaptchaValidator'],
[['test'], 'required', 'when' => function($model) { return $model->firstName === 'cebe'; }],
];
}
}