You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
825 B
34 lines
825 B
<?php
|
|
|
|
namespace App\Http\Requests\Api\Identity;
|
|
|
|
use App\Http\Requests\Api\ApiRequest;
|
|
use Illuminate\Validation\Rules\Password;
|
|
|
|
class UserRequest extends ApiRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'email' => ['email', 'required'],
|
|
'name' => ['string', 'required'],
|
|
'role' => ['string', 'required'],
|
|
'password' => Password::default(),
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'email' => __('domains/identity/field.user.email'),
|
|
'name' => __('domains/identity/field.user.name'),
|
|
'role' => __('resources.role'),
|
|
'password' => __('domains/identity/field.user.password'),
|
|
];
|
|
}
|
|
}
|
|
|