Exemplo n.º 1
0
Arquivo: user.php Projeto: anqqa/Anqh
 /**
  * Create new User Model
  *
  * @param  mixed  $id
  */
 public function __construct($id = null)
 {
     parent::__construct($id);
     // override defaults with configurable values, username
     $min = max(1, (int) Kohana::config('visitor.username.length_min'));
     $max = min(30, (int) Kohana::config('visitor.username.length_max'));
     $this->rules_register['username'] = array('required', 'length[' . $min . ',' . $max . ']', 'chars[' . Kohana::config('visitor.username.chars') . ']');
     // password
     $min = max(1, (int) Kohana::config('visitor.password.length_min'));
     $this->rules_register['password'] = $this->rules_password['password'] = array('required', 'length[' . $min . ',128]');
 }
Exemplo n.º 2
0
Arquivo: tag.php Projeto: anqqa/Anqh
 public function __construct($id = null)
 {
     parent::__construct($id);
     $this->form = array('id' => array('input' => array('type' => 'hidden')), 'tag_group_id' => array('input' => array('type' => 'hidden')), 'name' => array('input' => array('maxlength' => 32), 'label' => Kohana::lang('tags.group_name')), 'description' => array('input' => array('maxlength' => 250), 'label' => Kohana::lang('tags.group_description')));
 }