/**
  * Определяем правила валидации
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('post_title', 'string', 'min' => Config::Get('plugin.forum.post.title_min_length'), 'max' => Config::Get('plugin.forum.post.title_max_length'), 'allowEmpty' => true, 'label' => $this->Lang_Get('plugin.forum.post_create_title'), 'on' => array('post'));
     $this->aValidateRules[] = array('post_text_source', 'string', 'min' => 5, 'max' => Config::Get('plugin.forum.post.text_max_length'), 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.forum.post_create_text'), 'on' => array('topic', 'post'));
     $this->aValidateRules[] = array('post_text_source', 'post_unique', 'on' => array('topic', 'post'));
     if (!$this->User_IsAuthorization()) {
         $this->aValidateRules[] = array('guest_name', 'string', 'min' => 2, 'max' => 50, 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.forum.guest_name'), 'on' => array('topic', 'post'));
     }
 }
 /**
  * Определяем правила валидации
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('forum_title', 'string', 'min' => 2, 'max' => 100, 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.forum.create_title'));
     $this->aValidateRules[] = array('forum_url', 'url', 'label' => $this->Lang_Get('plugin.forum.create_url'));
     $this->aValidateRules[] = array('forum_url', 'url_unique', 'label' => $this->Lang_Get('plugin.forum.create_url'));
     $this->aValidateRules[] = array('forum_url', 'url_bad', 'label' => $this->Lang_Get('plugin.forum.create_url'));
     $this->aValidateRules[] = array('forum_limit_rating_topic', 'number', 'label' => $this->Lang_Get('plugin.forum.create_rating'));
     $this->aValidateRules[] = array('forum_sort', 'sort_check', 'label' => $this->Lang_Get('plugin.forum.create_sort'));
 }
 /**
  * Определяем правила валидации
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('topic_title', 'string', 'min' => 2, 'max' => 100, 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.forum.new_topic_title'));
     $this->aValidateRules[] = array('topic_description', 'string', 'max' => 100, 'allowEmpty' => true, 'label' => $this->Lang_Get('plugin.forum.new_topic_description'));
 }
 /**
  * Определяем правила валидации
  */
 public function Init()
 {
     parent::Init();
     $this->aValidateRules[] = array('topic_title', 'string', 'min' => Config::Get('plugin.forum.topic.title_min_length'), 'max' => Config::Get('plugin.forum.topic.title_max_length'), 'allowEmpty' => false, 'label' => $this->Lang_Get('plugin.forum.new_topic_title'));
     $this->aValidateRules[] = array('topic_description', 'string', 'max' => Config::Get('plugin.forum.topic.descr_max_length'), 'allowEmpty' => true, 'label' => $this->Lang_Get('plugin.forum.new_topic_description'));
 }