37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
class ComplainFormRequest extends ContactFormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return array_merge(parent::rules(), [
|
|
'productName' => 'required|min:2|max:100',
|
|
'productCode' => 'required|digits_between:8,13|min:1|max:9999999999999',
|
|
'buyPlace' => 'required|min:2|max:100',
|
|
'lotNumberName' => 'required|min:2|max:50',
|
|
'limitDateDay' => 'required|numeric|min:1|max:31',
|
|
'limitDateMonth' => 'required|numeric|min:1|max:31',
|
|
'limitDateYear' => 'required|numeric|min:2010|max:2050',
|
|
'consumptionDateDay' => 'required|numeric|min:1|max:31',
|
|
'consumptionDateMonth' => 'required|numeric|min:1|max:31',
|
|
'consumptionDateYear' => 'required|numeric|min:2010|max:2050',
|
|
]);
|
|
}
|
|
}
|