30 lines
765 B
PHP
30 lines
765 B
PHP
<?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]),
|
|
];
|
|
}
|
|
}
|