mirror of
https://github.com/koel/koel
synced 2024-12-21 01:53:11 +00:00
24 lines
529 B
PHP
24 lines
529 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
use Illuminate\Validation\Rules\Password;
|
|
|
|
/**
|
|
* @property-read string $password
|
|
* @property-read string $name
|
|
* @property-read string $email
|
|
*/
|
|
class UserStoreRequest extends Request
|
|
{
|
|
/** @return array<mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => 'required',
|
|
'email' => 'required|email|unique:users',
|
|
'password' => ['required', Password::defaults()],
|
|
'is_admin' => 'sometimes',
|
|
];
|
|
}
|
|
}
|