title: Laravel Validator::validateString|max does not exist Error
body: <p>In my Laravel 5.6.33 application I need to check dimension of an uploaded file with rule</p>
  
  <pre><code>    'avatar' =&gt; [
          'string|max:50',
          Rule::dimensions()-&gt;maxWidth(96)-&gt;maxHeight(64)-&gt;ratio(3 / 2),
      ],
  </code></pre>
  
  <p>But I got error:</p>
  
  <pre><code>Method Illuminate\Validation\Validator::validateString|max does not exist.
  </code></pre>
  
  <p>In declarations of rules I added a line:</p>
  
  <pre><code>use Illuminate\Validation\Rule;
  </code></pre>
  
  <p>But I have the error anyway...</p>
  
  <p>What did I miss?</p>
  
  <p>MODIFIED 2 :
  I see point in your comments:
  I have file input with js function on file selection</p>
  
  <pre><code>&lt;input type="file" style="display: none" ref="file_input" accept="avatar/*" @change="onImageSelected"&gt;
  </code></pre>
  
  <p>and when I selecte a file I keep it in this.user_avatar_url var and show on the form           </p>
  
  <pre><code>    onImageSelected(event) {
          this.is_page_updating = true
          const files = event.target.files
          let filename = files[0].name
          this.user_avatar = filename;
          if (filename.lastIndexOf('.') &lt;= 0) {
              return alert('Select valid avatar !')
          }
          const fileReader = new FileReader()
          fileReader.addEventListener('load', () =&gt; {
              this.user_avatar_url = fileReader.result
          })
          fileReader.readAsDataURL(files[0]);
          this.is_page_updating = false
      },
  </code></pre>
  
  <p>the user_avatar_url has comntent like </p>
  
  <pre><code>data:image/png;base64,iVBORw0KGgoAAAAN
  ...
  LSOiCLN/wIWijWu5oCk7wAAAABJRU5ErkJggg==
  </code></pre>
  
  <p>and setting the rule :</p>
  
  <pre><code>'avatar' =&gt; [
      'string',
      'max:100',
  ],
  'avatar_url' =&gt; [
      Rule::dimensions()-&gt;maxWidth(2896)-&gt;maxHeight(2864),
  ],
  </code></pre>
  
  <p>I have the same error. Looks like that is wrong way...
  Which is the correct way?</p>