I'm trying build a new application using Laravel 13.5.0 with Livewire starter kit. I've successfully added a new field, "phone", to my users table and created a user profile with the field filled in. I also have the saved value displaying correctly on my Profile Settings screen. But when I try to modify it and save, I get the Exception: "No property found for validation: phone".
The error is coming from a call to
$this->validate($this->profileRules($user->id))
My profileRules function looks like this:
protected function profileRules(?int $userId = null): array
{
return [
'name' => $this->nameRules(),
'email' => $this->emailRules($userId),
'pnone' => $this->phoneRules(),
];
}
with phoneRules defined as
protected function phoneRules(): array
{
return ['required', 'string', 'max:25'];
}
What am I missing?