From 12972cd086692f0f91a48d9d86947601bb88db19 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 19 Dec 2015 09:53:17 +1100 Subject: [PATCH] Lax the validation rules on login, email + pass --- modules/backend/controllers/Auth.php | 8 ++++---- modules/backend/models/User.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/backend/controllers/Auth.php b/modules/backend/controllers/Auth.php index 787e4a0628..2346010d90 100644 --- a/modules/backend/controllers/Auth.php +++ b/modules/backend/controllers/Auth.php @@ -63,8 +63,8 @@ public function signin() public function signin_onSubmit() { $rules = [ - 'login' => 'required|min:2|max:32', - 'password' => 'required|min:4' + 'login' => 'required|between:2,255', + 'password' => 'required|between:4,255' ]; $validation = Validator::make(post(), $rules); @@ -115,7 +115,7 @@ public function restore() public function restore_onSubmit() { $rules = [ - 'login' => 'required|min:2|max:32' + 'login' => 'required|between:2,255' ]; $validation = Validator::make(post(), $rules); @@ -176,7 +176,7 @@ public function reset_onSubmit() } $rules = [ - 'password' => 'required|min:4' + 'password' => 'required|between:4,255' ]; $validation = Validator::make(post(), $rules); diff --git a/modules/backend/models/User.php b/modules/backend/models/User.php index 0169d32051..4aaefd3f6d 100644 --- a/modules/backend/models/User.php +++ b/modules/backend/models/User.php @@ -21,8 +21,8 @@ class User extends UserBase * Validation rules */ public $rules = [ - 'login' => 'required|between:2,24|unique:backend_users', - 'email' => 'required|between:3,255|email|unique:backend_users', + 'email' => 'required|between:6,255|email|unique:backend_users', + 'login' => 'required|between:2,255|unique:backend_users', 'password' => 'required:create|between:4,255|confirmed', 'password_confirmation' => 'required_with:password|between:4,255' ];