42 lines
938 B
PHP
42 lines
938 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Design;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class GetEstimateParametersRequest 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, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'company_name' => 'nullable|string|max:100',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get custom messages for validator errors.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'company_name.string' => __('error.validation.string'),
|
|
'company_name.max' => __('error.validation.max.string'),
|
|
];
|
|
}
|
|
}
|