public function rules()
{
return [['blog_id, slug, title, content, status, publish_time', 'required', 'except' => 'search'], ['blog_id, create_user_id, update_user_id, status, comment_status, access_type, create_time, update_time, category_id', 'numerical', 'integerOnly' => true], ['blog_id, create_user_id, update_user_id, create_time, update_time, status, comment_status, access_type', 'length', 'max' => 11], ['lang', 'length', 'max' => 2], ['publish_time', 'length', 'max' => 20], ['slug', 'length', 'max' => 150], ['image', 'length', 'max' => 300], ['create_user_ip', 'length', 'max' => 20], ['description, title, link, keywords', 'length', 'max' => 250], ['quote', 'filter', 'filter' => 'trim'], ['link', 'yupe\\components\\validators\\YUrlValidator'], ['comment_status', 'in', 'range' => array_keys($this->getCommentStatusList())], ['access_type', 'in', 'range' => array_keys($this->getAccessTypeList())], ['status', 'in', 'range' => array_keys($this->getStatusList())], ['slug', 'yupe\\components\\validators\\YSLugValidator', 'message' => Yii::t('BlogModule.blog', 'Forbidden symbols in {attribute}')], ['title, slug, link, keywords, description, publish_time', 'filter', 'filter' => [$obj = new CHtmlPurifier(), 'purify']], ['slug', 'unique'], ['tags', 'safe'], ['tags', 'default', 'value' => []], ['id, blog_id, create_user_id, update_user_id, create_time, update_time, slug, publish_time, title, quote, content, link, status, comment_status, access_type, keywords, description, lang', 'safe', 'on' => 'search']];
}