29 lines
789 B
PHP
29 lines
789 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\ItemMaster;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class ItemFieldUpdateRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'field_name' => 'sometimes|string|max:255',
|
||
|
|
'field_type' => 'sometimes|in:textbox,number,dropdown,checkbox,date,textarea',
|
||
|
|
'is_required' => 'nullable|boolean',
|
||
|
|
'default_value' => 'nullable|string',
|
||
|
|
'placeholder' => 'nullable|string|max:255',
|
||
|
|
'display_condition' => 'nullable|array',
|
||
|
|
'validation_rules' => 'nullable|array',
|
||
|
|
'options' => 'nullable|array',
|
||
|
|
'properties' => 'nullable|array',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|