| @@ 42-50 (lines=9) @@ | ||
| 39 | /** |
|
| 40 | * @inheritdoc |
|
| 41 | */ |
|
| 42 | public function rules() |
|
| 43 | { |
|
| 44 | return [ |
|
| 45 | [['customer_id'], 'integer'], |
|
| 46 | [['type'], 'string'], |
|
| 47 | [['customer_id', 'type'], 'required'], |
|
| 48 | [['type'], 'default', 'value' => 'Individual'], |
|
| 49 | ]; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @inheritdoc |
|
| @@ 36-61 (lines=26) @@ | ||
| 33 | /** |
|
| 34 | * @inheritdoc |
|
| 35 | */ |
|
| 36 | public function rules() |
|
| 37 | { |
|
| 38 | return [ |
|
| 39 | [ |
|
| 40 | [ |
|
| 41 | 'user_id', |
|
| 42 | 'title', |
|
| 43 | 'default', |
|
| 44 | ], |
|
| 45 | 'required' |
|
| 46 | ], |
|
| 47 | [ |
|
| 48 | [ |
|
| 49 | 'user_id', |
|
| 50 | ], |
|
| 51 | 'integer' |
|
| 52 | ], |
|
| 53 | [ |
|
| 54 | [ |
|
| 55 | 'default', |
|
| 56 | ], |
|
| 57 | 'boolean' |
|
| 58 | ], |
|
| 59 | [['default'], 'default', 'value' => true], |
|
| 60 | ]; |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @inheritdoc |
|