Files
myskin-api/app/Http/Requests/V1/StoreAccountRequest.php
2026-07-15 17:23:15 +07:00

35 lines
847 B
PHP

<?php
namespace App\Http\Requests\V1;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreAccountRequest 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'],
'email' => ['required', 'email'],
'phone' => ['required'],
'dob' => ['required'],
'role' => ['required', Rule::in(['patient', 'doctor', 'admin'])],
'password' => ['required'],
];
}
}