Shree krishna lamichhane
Shree Krishna Lamichhane

Shree Krishna Lamichhane

Same Email/Username update validation rule in Laravel

Shree krishna lamichhane
·May 14, 2022·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

$request->validate([
'email' => ['required','string','unique:users,email,'.$user_id],
'username' => ['required','string','unique:users,username,'.$user_id],
 
Share this