Domain\Billet\Http\Requests\UpdateRequest::rules PHP Method

rules() public method

Get the validation rules that apply to the request.
public rules ( ) : array
return array
    public function rules()
    {
        $id = $this->route('billet');
        $billet = Billet::where('id', $id)->first();
        return ['amount' => 'required|numeric', 'discount' => 'numeric', 'interest' => 'numeric', 'payment_of_fine' => 'numeric', 'date' => 'date|date_format:Y-m-d', 'refer' => 'required|integer|min:201604|date_format:Ym', 'student_id' => 'in:' . $billet->student_id, 'note' => 'max:65535', 'new_due_date' => 'date|date_format:Y-m-d|after:today', 'statement01' => 'max:30', 'statement02' => 'max:30', 'statement03' => 'max:30', 'statement04' => 'max:30', 'statement05' => 'max:30', 'instruction01' => 'max:30', 'instruction02' => 'max:30', 'instruction03' => 'max:30', 'instruction04' => 'max:30', 'instruction05' => 'max:30', 'acceptance' => 'boolean', 'kind_document' => 'max:3'];
    }
UpdateRequest