FeedBack::rules PHP Метод

rules() публичный Метод

public rules ( ) : array
Результат array validation rules for model attributes.
    public function rules()
    {
        return [['name, email, theme, text', 'required'], ['name, email, theme, text, phone', 'filter', 'filter' => [$obj = new CHtmlPurifier(), 'purify']], ['type, status, answer_user, is_faq, type, category_id', 'numerical', 'integerOnly' => true], ['is_faq', 'in', 'range' => array_keys($this->getIsFaqList())], ['status', 'in', 'range' => array_keys($this->getStatusList())], ['type', 'in', 'range' => array_keys($this->getTypeList())], ['name, email, phone', 'length', 'max' => 150], ['theme', 'length', 'max' => 250], ['ip', 'length', 'max' => 20], ['answer_time', 'length', 'max' => 100], ['email', 'email'], ['answer', 'filter', 'filter' => 'trim'], ['id, create_time, update_time, name, email, theme, text, type, status, ip', 'safe', 'on' => 'search']];
    }