#No property found for validation [0]
16 messages · Page 1 of 1 (latest)
Oh just noticed its a comma not a dot. Just throw square brackets around the rules and you should be fine. 'email' => [ ... ]
Method Illuminate\Validation\Validator::validateRequired|unique does not exist.
Because you need to use an array to specify your rules now.
'email' => ['required', 'unique:users,email', Rule::unique('users')->ignore($this->user()->getKey()),
☝️
@balmy flume And also, because a form request class extends the base Request class, you can just use $this->user to access the authenticated user rather than relying on facades or helpers like auth()->user()
BadMethodCallException
Method App\Http\Livewire\Admin\AccountDetails::user does not exist.
it doesn't have access to it
Ah, you're calling it from a controller
yes
what should i do?
Just use the auth() helper is fine
Best is to just extract your validation to a form request, to keep your code clean (and benefit of stuff like this), but thats upto you
$request->user() is finer imo 😄
im using controller