igfs/kernel/modules/menu/models/forms/CreateMenuForm.php

34 lines
809 B
PHP
Raw Normal View History

2024-08-30 16:14:31 +03:00
<?php
2024-09-10 15:45:12 +03:00
namespace kernel\modules\menu\models\forms;
2024-08-30 16:14:31 +03:00
use kernel\FormModel;
2024-09-10 12:55:41 +03:00
/**
* @property int $parent_id
* @property string $icon_file
* @property string $icon_font
* @property string $label
* @property string $url
* @property int $status
2024-09-24 14:57:25 +03:00
* @property int priority
* @property string $slug
* @property string $parent_slug
2024-09-10 12:55:41 +03:00
*/
2024-08-30 16:14:31 +03:00
class CreateMenuForm extends FormModel
{
public function rules(): array
{
return [
'parent_id' => '',
'icon_file' => '',
'icon_font' => '',
'label' => 'required|min-str-len:1|max-str-len:50',
'url' => 'required|min-str-len:1',
'status' => '',
'slug' => 'required|min-str-len:1|max-str-len:50',
2024-09-24 14:57:25 +03:00
'parent_slug' => '',
'priority' => ''
2024-08-30 16:14:31 +03:00
];
}
}