check(); } /** * Prepare the data for validation. * @return void */ protected function prepareForValidation(): void { $this->merge([ 'key' => Str::slug($this->key), ]); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'key' => 'string', 'value' => 'string', 'brand' => 'integer|exists:App\Models\Brand,id', 'image_settings' => 'string' ]; } }