public function rules(): array 	{ 		$validation_rule_builder = [];  		foreach (getCurrentLanguages() as $lang) { 			$required = ($lang === getMainActiveLanguage()) || ($lang === getDefaultLanguage());  			$validation_rule_builder['name.' . $lang] = [$required ? 'required' : 'nullable', 'string', 'max:100']; 			$validation_rule_builder['description.' . $lang] = ['nullable', 'string', 'max:1000'];  			// FAQS 			$validation_rule_builder['question.' . $lang . '.*'] = ['nullable', 'string', 'max:300', 'required_with:answer.' . $lang]; 			$validation_rule_builder['answer.' . $lang . '.*'] = ['nullable', 'string', 'max:500', 'required_with:question.' . $lang]; 			$validation_rule_builder['order_number.*'] = ['nullable', 'integer', 'min:0', 'required_with:question.' . $lang];  			// SUPPORT 			$validation_rule_builder['support.' . $lang] = ['nullable', 'string', 'max:5000']; 			$validation_rule_builder['use_care.' . $lang] = ['nullable', 'string', 'max:5000']; 			$validation_rule_builder['benefits.' . $lang] = ['nullable', 'string', 'max:5000']; 			$validation_rule_builder['features.' . $lang] = ['nullable', 'string', 'max:5000'];  			// FILTERS 			$validation_rule_builder['filters.*.' . $lang] = ['nullable', 'string', 'max:100'];  			// SPECS 			$validation_rule_builder['specs.' . $lang] = ['nullable', 'string', 'max:100']; 		}  		foreach ($this->filters ?? [] as $key => $value) { 			$filter = Filter::find($key); 			$min = $filter->min; 			$max = $filter->max; 			$required = $filter->required ?? false;  			switch ($filter->type) { 				case 'TEXT': 				case 'range': 					$validation_rule_builder['filters.' . $key] = ['nullable', 'string', 'max:50', 						$min ? 'min:' . $min : '', 						$max ? 'max:' . $max : '', 						$required ? 'required' : ''];  					break;  				case 'NUMBER': 					$validation_rule_builder['filters.' . $key] = ['nullable', 'numeric', 						$min ? 'min:' . $min : '', 						$max ? 'max:' . $max : '', 						$required ? 'required' : ''];  					break;  				case 'dropdown': 					foreach (getCurrentLanguages() as $lang) { 						$validation_rule_builder['filters.' . $key . '.' . $lang] = ['required', 'in:' . implode(',', $filter->dropdown_values[$lang])]; 					}  					break; 			} 		}  		return array_merge(MediaStorage::mergeValidationRules([ 			'matching_name' => ['nullable', 'max:50', 'string'], 			'sku' => ['required', 'max:50', 'string', new UniqueOnMarket(Product::class, 'sku', $this->market_id, $this->sku, $this->id?->id)], 			'video_url' => ['nullable', 'max:500'], 			'price_without_pdv' => ['required', 'numeric', 'min:1'], 			'color' => ['required'], 			'weight' => ['required', 'numeric', 'min:0'], 			'popular' => ['nullable', 'boolean'], 			'accessory' => ['nullable', 'boolean'], 			'active' => ['nullable', 'boolean'], 			'stocked' => ['nullable', 'boolean'], 			'discontinued' => ['nullable', 'boolean'], 			'manufacturer_id' => ['nullable', 'exists:manufacturers,id'], 			'question' => ['nullable', 'array'], 			'answer' => ['nullable', 'array'], 			'order_number' => ['nullable', 'array'], 			'specs_categories' => ['nullable', 'array'], 			'specs_categories.*' => ['nullable', 'exists:specs_categories,id'], 			'shops' => ['array'], 			'shops.*' => ['exists:shops,id'], 			'available_accessories' => ['nullable', 'array'], 			'available_accessories.*' => ['nullable', 'exists:products,id'], 			'included_accessories' => ['nullable', 'array'], 			'included_accessories.*' => ['nullable', 'exists:products,id'], 			'filters' => ['nullable', 'array'], 			'images' => ['max:' . setting('max_upload_size') / 1024, new SafeWebp], 			'gallery' => ['max:' . setting('max_upload_size') / 1024, new SafeWebp], 			'manuals' => ['max:' . setting('max_upload_size') / 1024, new SafeWebp], 		])); 	}