check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'name' => 'required|string|min:2|max:255', 'code_ean' => 'required|numeric', 'picture' => [ 'image', 'mimes:jpeg,png,jpg', 'max:2048', Rule::dimensions() ->maxWidth(config('theme.product_image_maxwidth')) ->maxHeight(config('theme.product_image_maxheight')) ], 'range_id' => 'exists:ranges,id' ]; } }