MicroFrameWork/kernel/modules/user/models/forms/CreateUserForm.php

28 lines
590 B
PHP
Raw Normal View History

2024-07-24 14:07:45 +03:00
<?php
2024-09-10 15:45:12 +03:00
namespace kernel\modules\user\models\forms;
2024-07-24 14:07:45 +03:00
use kernel\FormModel;
class CreateUserForm extends FormModel
{
public function rules(): array
{
return [
'username' => 'required|min-str-len:5|max-str-len:30',
'password' => 'required|min-str-len:5|max-str-len:30',
'email' => 'required|email'
];
}
2024-12-03 12:13:18 +03:00
public function rulesForUpdate(): array
{
return [
'username' => 'required|min-str-len:5|max-str-len:30',
'password' => '',
'email' => 'required|email'
];
}
2024-07-24 14:07:45 +03:00
}