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

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-include of inline SVG does not display gradient except in Chrome