CourseWork/app/Http/Requests/TeacherPostRequest.php
m.zargarov 3ed3475e6a Fixes
2024-04-27 15:10:21 +04:00

36 lines
914 B
PHP

<?php
namespace App\Http\Requests;
use App\Enums\RoleEnum;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class TeacherPostRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => 'required|max:255',
'last_name' => 'required|max:255',
'middle_name' => 'required|max:255',
'birthday' => 'required|date',
'email' => 'required|max:255|lowercase|unique:users,email',
'password' => 'required|max:255',
];
}
}