42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V3\Dashboard\Harim\PanjareVahed;
|
|
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ReceiveNewRequest 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, ValidationRule|array|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'request_id' => 'required|unique:harims,panjare_vahed_id',
|
|
'national_id' => 'required',
|
|
'phone_number' => 'required',
|
|
'request_date' => 'required',
|
|
'requested_organization' => 'required|string',
|
|
'plan_group' => 'required',
|
|
'plan_title' => 'required',
|
|
'worksheet' => 'required',
|
|
'response_options' => 'required',
|
|
'isic' => 'required',
|
|
'primary_area' => 'required|array',
|
|
'primary_area.type' => 'required|string',
|
|
'primary_area.coordinates' => 'required|array',
|
|
];
|
|
}
|
|
}
|