[英]How to use the laravel 5.2 mimes?
I've put the file in accordance with the validation. 我已经根据验证文件了。 But why do mimes don't work?
但是,为什么哑剧不起作用?
I have also added the ' enctype = "multipart/form-data" ' in the form 我还以以下形式添加了“ enctype =“ multipart / form-data”
This piece of validation: 此验证:
$validator = Validator::make($request->all(), [
'nomor_kk' => 'required|numeric|digits_between:1,16',
'srt_akademik' => 'required|mimes:jpeg,bmp,png,jpg',
]);
if ($validator->fails()) {
return redirect('/daftarbeasiswa')
->withInput()
->withErrors($validator, 'insert');
}
对于多个文件使用此
'srt_akademik.*' => 'required|mimes:jpeg,bmp,png,jpg'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.