title: laravel validate unique fields on update
body: <p>I am using the L5 repository and it has the validator package (<a href="https://github.com/andersao/laravel-validator" rel="nofollow noreferrer">https://github.com/andersao/laravel-validator</a>) but I am have problems to do the validation of the unique fields on update it, anyone to help me???</p>
  
  <p>******the example bellow I tried in this way on RULE_UPDATE but no success..</p>
  
  <p><strong>((((((FIELDS I WANT TO VALIDATE : people_id, email BECAUSE THESE ARE UNIQUE ONLY FOR REST OF THE USERS, NOT TO THIS CURRENT USER THAT ITS UPDATING )))))))</strong></p>
  
  <p>calling the validation in the UserService.php:</p>
  
  <p>use Prettus\Validator\Contracts\ValidatorInterface;</p>
  
  <pre><code>        public __construct(){
             $this-&gt;validator = \App::make('App\Validators\UserValidator');
          }
          save($data){
  
          if(!empty($data['id'])){
  
              $this-&gt;validator-&gt;with($data)-&gt;passesOrFail(ValidatorInterface::RULE_UPDATE);
  
          }else{
              $this-&gt;validator-&gt;with($data)-&gt;passesOrFail(ValidatorInterface::RULE_CREATE);
          }
          }
  </code></pre>
  
  <p>
  
  <p>namespace App\Validators;</p>
  
  <p>use \Prettus\Validator\Contracts\ValidatorInterface;
  use \Prettus\Validator\LaravelValidator;</p>
  
  <p>class UserValidator extends LaravelValidator
  {</p>
  
  <pre><code>protected $rules = [
      ValidatorInterface::RULE_CREATE =&gt; [
  
          'people_id' =&gt; 'required|unique:users',
          'active' =&gt; 'required',
          'available_chat' =&gt; 'required',
          'email' =&gt; 'required|string|email|max:255|unique:users',
          'password' =&gt; 'required|string|min:6|confirmed',
          'masters_id' =&gt; 'required',
      ],
      ValidatorInterface::RULE_UPDATE =&gt; [
  
          'id' =&gt; 'required',
          'people_id' =&gt; 'required|unique:users,id,:id',
          'active' =&gt; 'required',
          'available_chat' =&gt; 'required',
          'email' =&gt; 'required|string|email|max:255|unique:users,id,:id',
          //'password' =&gt; 'required|string|min:6|confirmed',
          //'masters_id' =&gt; 'required',
      ],
  ];
  protected $messages = [
  
          'id.required' =&gt; 'Usuário não encontrado!',
          'people_id.required' =&gt; 'Pessoa é obrigatório',
          'people_id.unique' =&gt; 'Pessoa já cadastrada',
          'active.required' =&gt; 'Obrigatório',
          'available_chat.required' =&gt; 'Obrigatório',
          'email.required' =&gt; 'Digite o e-mail',
          'password.required' =&gt; 'Digite a senha',
          'password.min' =&gt; 'Digite uma senha com 6 caracteres',
          'password.confirmed' =&gt; 'Confirme a senha corretamente',
          'email.unique' =&gt; 'E-mail já cadastrado',
  ];
  </code></pre>
  
  <p>}</p>