2024-07-25 16:15:18 +03:00
|
|
|
<?php
|
|
|
|
|
2024-09-10 15:45:12 +03:00
|
|
|
namespace kernel\modules\post\models\forms;
|
2024-07-25 16:15:18 +03:00
|
|
|
|
|
|
|
use kernel\FormModel;
|
|
|
|
|
|
|
|
class CreatePostForm extends FormModel
|
|
|
|
{
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
2024-09-26 14:47:13 +03:00
|
|
|
'content' => 'required|min-str-len:10',
|
|
|
|
'title' => 'required|min-str-len:5',
|
|
|
|
'slug' => '',
|
2024-07-26 16:09:06 +03:00
|
|
|
'user_id' => 'required',
|
2024-07-25 16:15:18 +03:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|