app/Http/Requests/SpareDataRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
        'spareImage' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',
            'partNumber' => 'required|max:100',
            'quantity'=>'integer|min:0',
            'cost'=>'integer|min:0',
            'price'=>'integer|min:0',
        ];
    }
public function rules ( ) { return [ 'spareImage' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048' , 'partNumber' => 'required|max:100' , 'quantity' => 'integer|min:0' , 'cost' => 'integer|min:0' , 'price' => 'integer|min:0' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .