title: Using filters from other classes within rules method in Yii 2?
body: <p>Consider this code inside a model:</p>
  
  <pre><code>public function rules() {
      return [
          [['company_name', 'first_name', 'last_name'], 'sanitize'],
          //........
      ];
  }
  </code></pre>
  
  <p><code>sanitize</code> is a custom method inside the current class, which is:</p>
  
  <pre><code>public function sanitize($attribute) {
      $this-&gt;{$attribute} = general::stripTagsConvert($this-&gt;{$attribute}, null, true);
  }
  </code></pre>
  
  <p>Now this method obviously will come in handy in many models so I don't want to keep repeating the same code in every model. Is there a way I can reference another class in the rules in place of the current <code>sanitize</code> method name which is binded to the current class?</p>