Skip to content

Commit

Permalink
Lax the validation rules on login, email + pass
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Dec 18, 2015
1 parent 01b2d0d commit 12972cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions modules/backend/controllers/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -176,7 +176,7 @@ public function reset_onSubmit()
}

$rules = [
'password' => 'required|min:4'
'password' => 'required|between:4,255'
];

$validation = Validator::make(post(), $rules);
Expand Down
4 changes: 2 additions & 2 deletions modules/backend/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
];
Expand Down

0 comments on commit 12972cd

Please sign in to comment.