Vue.js not setting data
<p>I'm trying to do some simple form validation using Laravel 5.3 and Vue.js.</p>

<p>Laravel controller:</p>

<pre><code> public function test(\Illuminate\Http\Request $request)
    {
        $this-&gt;validate($request, [
            'name' =&gt; 'required',
            'date' =&gt; 'required'
        ]);
...
    }
</code></pre>

<p>Vue data:</p>

<pre><code>let app = new Vue({
        el: '#app',

data: {
        submitted: false,
        errors: [],
        post: {
               name: '',
               date: '',
              },
},
</code></pre>

<p>Vue post:</p>

<pre><code>Vue.http.post('url', post).then((response) =&gt; {
    // form submission successful, reset post data and set submitted to true
    app.post = {
        name: '',
        date: '',
    };

    // clear previous form errors
    app.$set('errors', '');

    app.submitted = true;

}, (response) =&gt; {
    // form submission failed, pass form  errors to errors array
    console.log(response.data.name); //"The Name field is required."
    app.$set('errors', response.data); // TypeError
});
</code></pre>

<p>I'm getting </p>

<blockquote>
  <p>TypeError: can't assign to properties of (new String("errors")): not
  an object</p>
</blockquote>

<p>with <code>app.$set('errors', response.data);</code> </p>

<p>Where am I going wrong?</p>