When i upload file Validator::make() will catch if a file too big and $this->validate is not.
My example:
$this->validate($request, [
'my_audio' => 'mimes:wav,mp3', //only allow this type extension file.
]);
// not catch
and
$validator = Validator::make($request->all(), [
'my_audio' => 'mimes:wav,mp3',
]);
if ($validator->fails()) {
// catched
}
How to fix that if i using $this->validate thank
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire