| @@ 30-47 (lines=18) @@ | ||
| 27 | /** |
|
| 28 | * @inheritdoc |
|
| 29 | */ |
|
| 30 | public function rules() |
|
| 31 | { |
|
| 32 | return [ |
|
| 33 | [ |
|
| 34 | ['id', 'name'], |
|
| 35 | 'required', |
|
| 36 | ], |
|
| 37 | [ |
|
| 38 | ['name'], |
|
| 39 | 'string', |
|
| 40 | 'max' => 255, |
|
| 41 | ], |
|
| 42 | [ |
|
| 43 | ['id', 'parentId'], |
|
| 44 | 'integer', |
|
| 45 | ], |
|
| 46 | ]; |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| @@ 38-55 (lines=18) @@ | ||
| 35 | /** |
|
| 36 | * @inheritdoc |
|
| 37 | */ |
|
| 38 | public function rules() |
|
| 39 | { |
|
| 40 | return [ |
|
| 41 | [ |
|
| 42 | ['cost', 'days'], |
|
| 43 | 'required', |
|
| 44 | ], |
|
| 45 | [ |
|
| 46 | ['cost', 'orderBefore'], |
|
| 47 | 'integer', |
|
| 48 | ], |
|
| 49 | [ |
|
| 50 | ['days'], |
|
| 51 | 'string', |
|
| 52 | 'max' => 5, |
|
| 53 | ], |
|
| 54 | ]; |
|
| 55 | } |
|
| 56 | ||
| 57 | /** |
|
| 58 | * @inheritdoc |
|