diff --git a/app/Models/User.php b/app/Models/User.php index 1cd39abbf1..5c539ad1c9 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -75,12 +75,12 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo */ protected $rules = [ - 'first_name' => 'required|string|min:1', - 'username' => 'required|string|min:1|unique_undeleted', - 'email' => 'email|nullable', + 'first_name' => 'required|string|min:1|max:191', + 'username' => 'required|string|min:1|unique_undeleted|max:191', + 'email' => 'email|nullable|max:191', 'password' => 'required|min:8', 'locale' => 'max:10|nullable', - 'website' => 'url|nullable', + 'website' => 'url|nullable|max:191', 'manager_id' => 'nullable|exists:users,id|cant_manage_self', 'location_id' => 'exists:locations,id|nullable', ]; diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index 6eb525d174..cab3790583 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -87,7 +87,7 @@
- + {!! $errors->first('first_name', '') !!}
@@ -96,7 +96,7 @@
- + {!! $errors->first('last_name', '') !!}
@@ -113,6 +113,7 @@ id="username" value="{{ Request::old('username', $user->username) }}" autocomplete="off" + maxlength=191" readonly onfocus="this.removeAttribute('readonly');" {{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }} @@ -235,6 +236,7 @@ type="text" name="email" id="email" + maxlength=191" value="{{ Request::old('email', $user->email) }}" {{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }} autocomplete="off" @@ -307,6 +309,7 @@ type="text" aria-label="employee_num" name="employee_num" + maxlength=191" id="employee_num" value="{{ Request::old('employee_num', $user->employee_num) }}" /> @@ -322,6 +325,7 @@
- + {!! $errors->first('phone', '') !!}
@@ -367,7 +371,7 @@
- + {!! $errors->first('website', '') !!}
@@ -376,7 +380,7 @@
- + {!! $errors->first('address', '') !!}
@@ -385,7 +389,7 @@
- + {!! $errors->first('city', '') !!}