user()->lang_code; return [ 'title.'. $code => 'nullable|max:255', 'subtitle.'. $code => 'nullable|max:255', 'description.'. $code => 'nullable', 'file' => 'nullable|mimes:jpeg,jpg,png,webp,bmp' ]; }else{ return [ 'title' => 'nullable|max:255', 'subtitle' => 'nullable|max:255', 'description' => 'nullable', 'file' => 'nullable|mimes:jpeg,jpg,png,webp,bmp' ]; } } public function messages() { if (isModuleActive('FrontendMultiLang')) { return [ 'title.*.max' => 'The title max length must be 255 words', 'subtitle.*.max' => 'The subtitle max length must be 255 words', ]; }else{ return [ 'title.max' => 'The title max length must be 255 words', 'subtitle.max' => 'The subtitle max length must be 255 words', ]; } } public function authorize() { return true; } }