+
+ if (!$this->boolean('license')) {
+ $this->show_form(_t('You can\'t register if you don\'t agree to the license.'));
+ } else if (!Validate::email($email, true)) {
+ $this->show_form(_t('Not a valid email address.'));
+ } else if (!Validate::string($nickname, array('min_length' => 1,
+ 'max_length' => 64,
+ 'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+ $this->show_form(_t('Nickname must have only letters and numbers and no spaces.'));
+ } else if ($this->nickname_exists($nickname)) {
+ $this->show_form(_t('Nickname already exists.'));