title: Laravel request validation - nullable image
body: <p>I have registration form with username, email, password and avatar(image) fields. Everything works except image filed, which can be null. I am using Vue as front-end and send data with axios to Laravel.</p>
  
  <p>This is validation:</p>
  
  <pre><code>public function register(Request $request)
  {
      $request-&gt;validate([
          'username' =&gt; 'required|string|max:255|unique:users',
          'email' =&gt; 'required|string|email|max:255|unique:users',
          'password' =&gt; 'required|string|min:6',
          'avatar' =&gt; 'nullable|image|mimes:jpg,jpeg,png|max:1999'
      ]);
  
      $fileNameToStore = 'noimage.jpg';
  
      return User::create([
          'username' =&gt; $request-&gt;username,
          'email' =&gt; $request-&gt;email,
          'password' =&gt; Hash::make($request-&gt;password),
          'avatar' =&gt; $fileNameToStore
      ]);
  }
  </code></pre>
  
  <p>And this is how I send data:</p>
  
  <pre><code>register(context, data) {
        let formData = new FormData();
        formData.append('avatar', data.avatar)
        formData.append('username', data.username)
        formData.append('email', data.email)
        formData.append('password', data.password)
  
        return new Promise((resolve, reject) =&gt; {
          axios.post('/register', formData,{
            headers: {
                'Content-Type': 'multipart/form-data'
            }
          })
            .then(response =&gt; {
              resolve(response)
            })
            .catch(error =&gt; {
              reject(error)
            })
        })
  }
  </code></pre>
  
  <p>If I fill out every filed it works fine and also other things like checking extension or file size works, only problem is when I don't select any image. I have nullable included in validation, but I still get error message from validation that it must be an image and which extension it needs to have.</p>