diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index 30dcbf43..8e6be80e 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -147,11 +147,12 @@ public function attemptRegister() // Validate here first, since some things, // like the password, can only be validated properly here. - $rules = array_merge($users->getValidationRules(['only' => ['username']]), [ - 'email' => 'required|valid_email|is_unique[users.email]', - 'password' => 'required|strong_password', - 'pass_confirm' => 'required|matches[password]', - ]); + $rules = [ + 'username' => 'required|alpha_numeric_space|min_length[3]|is_unique[users.username]', + 'email' => 'required|valid_email|is_unique[users.email]', + 'password' => 'required|strong_password', + 'pass_confirm' => 'required|matches[password]', + ]; if (! $this->validate($rules)) {