public function filterAttributes($attributeNames = null)
    {
        $this->beforeFilter();

        if ($attributeNames === null) {
            $attributeNames = $this->activeFilterAttributes();
        }

        if (empty($attributeNames)) {
            return;
        }

        foreach ($this->getActiveFilters() as $validator) {
            $validator->validateAttributes($this, $attributeNames);
        }
        $this->afterFilter();
    }