Files
backend_vib360_laravel/app/Http/Requests/CreateUserRequest.php

46 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2025-03-18 16:39:57 +05:30
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateUserRequest extends FormRequest
{
2025-03-18 19:28:52 +05:30
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
2025-03-18 16:39:57 +05:30
{
return true;
}
2025-03-18 19:28:52 +05:30
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
2025-03-18 16:39:57 +05:30
{
return [
'email' => 'required|email|unique:users,email',
// 'password' => 'required|min:6',
'authority' => 'required|in:TENANT_ADMIN,CUSTOMER_USER,SYS_ADMIN',
'first_name' => 'nullable|string|max:50',
'last_name' => 'nullable|string|max:50',
'phone' => 'nullable|string|max:20',
'tenant_id' => 'required|integer',
'customer_id' => 'required|uuid',
'version' => 'required|integer',
'name' => 'required|string|max:255',
'description' => 'nullable|string',
'default_dashboard_id' => 'nullable|uuid',
'default_dashboard_fullscreen' => 'boolean',
'home_dashboard_id' => 'nullable|uuid',
'home_dashboard_hide_toolbar' => 'boolean',
'user_credentials_enabled' => 'boolean',
'failed_login_attempts' => 'integer',
'last_login_ts' => 'nullable|integer',
];
}
}