Thursday, May 17, 2018

Video not working validation Laravel - development

Video not working validation Laravel

This is my code for the image the validation works but for audio and video does not work..

 private function getFileRules(){
            return array('question_image' => 'mimes:jpeg,jpg,png|max:10000',
                         'question_audio' => 'max:30000',
                         'question_video' => 'present|file|mimetypes:video/mp4,video/ogg|max:10000');
        }

        private function isFileValid($request){
            $rules = self::getFileRules();
            $validator = Validator::make($request->all(), $rules);
            if($validator->fails()){
                return false;
            }else{
                return true;
            }
        }

Why it does not work since it is the same code.?!



from Laravel Questions and Answers https://laravelquestions.com/laravel/video-not-working-validation-laravel/
via Lzo Media

No comments:

Post a Comment