Skip to content

Commit

Permalink
Fix #37
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravitano committed Jun 14, 2015
1 parent 221f995 commit 67cd2e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Pingpong/Admin/Validation/User/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ public function rules()
{
$id = Request::segment(3);

return [
$rules = [
'name' => 'required',
'email' => 'required|unique:users,email,' . $id,
'password' => 'required|min:6|max:20',
];

if ($this->has('password')) {
$rules['password'] = 'required|min:6|max:20';
}

return $rules;
}
}

0 comments on commit 67cd2e9

Please sign in to comment.