category_type = Category::select('category_type')->find($this->category_id); \Log::error('Category Type: '.$this->category_type); $this->merge([ 'model_category_type' => $this->category_type, ]); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return array_merge( ['model_category_type' => 'required|in:asset'], parent::rules(), ); } public function messages(): array { $messages = ['model_category_type.in' => 'The category must be an asset category, dummy.']; return $messages; } }