Files
sam-api/app/Http/Requests/Design/BomTemplate/DiffRequest.php

30 lines
771 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\Design\BomTemplate;
use Illuminate\Foundation\Http\FormRequest;
class DiffRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'other_template_id' => 'required|integer|min:1',
];
}
public function messages(): array
{
return [
'other_template_id.required' => __('validation.required', ['attribute' => 'other_template_id']),
'other_template_id.integer' => __('validation.integer', ['attribute' => 'other_template_id']),
'other_template_id.min' => __('validation.min.numeric', ['attribute' => 'other_template_id', 'min' => 1]),
];
}
}