title: Laravel validation - comma separated string input as array
body: <p>How can I validate one input with multiple values? I'm using bootstrap tagsinput plugin. It returns all tags in one field. I need to validate this tags - unique.
  First I'm trying to place this tags into array and then validate it in request but still no luck.
  Here is my code in request:</p>
  
  <pre><code>public function all()
  {
      $postData = parent::all();
  
      // checkbox status
      if(array_key_exists('keywords', $postData)) {
  
          // put keywords into array
          $keywords = explode(',', $postData['keywords']);
  
          $test = [];
          $i = 0;
          foreach($keywords as $keyword)
          {
              $test[$i] = $keyword;
              $i++;
          }
          $postData['keywords'] = $test;
  
      }
  
      return $postData;
  
  }
  
  public function rules()
  {
      $rules = [
          'title' =&gt; 'required|min:3|unique:subdomain_categories,title|unique:subdomain_keywords,keyword',
          'description' =&gt; '',
          'image' =&gt; 'required|image',
          'keywords.*' =&gt; 'min:3'
      ];
  
      return $rules;
  }
  </code></pre>
  
  <p>But as soon as keyword becomes invalid I get this error:</p>
  
  <p>ErrorException in helpers.php line 531:
  htmlentities() expects parameter 1 to be string, array given.</p>
  
  <p>Any ideas what's wrong?</p>