rene

ConvertEmptyStringsToNull not working with Vue

Posted 2 years ago by rene

Hi, In L5.4 there is

\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,

But it doesn't work with Vue.

I have this Form.js class from VueCasts (https://github.com/laracasts/Vue-Forms/blob/master/public/js/app.js).

I have this: <input type="text" v-model="foo.website"> I have validation that website has to be a valid url, but not required. But it always send an empty string, so it tells me the given value is invalid.

This is what ConvertEmptyStringsToNull should come in, right? I don't get it to work with Vue.

Please sign in or create an account to participate in this conversation.