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

32 lines
753 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
* @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',
'parent_slug' => ''
2024-08-30 16:14:31 +03:00
];
}
}