From 68369ac5bb6a1729b34ad8b0a2851c5c9d170626 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Thu, 24 Sep 2015 23:07:30 +0200 Subject: [PATCH] heavier validation for username --- src/Core/Users/User.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Core/Users/User.php b/src/Core/Users/User.php index b2b20f3f0..639a06550 100755 --- a/src/Core/Users/User.php +++ b/src/Core/Users/User.php @@ -55,7 +55,13 @@ class User extends Model * @var array */ protected $rules = [ - 'username' => 'required|alpha_dash|unique', + 'username' => [ + 'required', + 'alpha_dash', + 'unique', + 'min:3', + 'max:30', + ], 'email' => 'required|email|unique', 'password' => 'required', 'join_time' => 'date',