Skip to main content

Same Email/Username update validation rule in Laravel

Published 1 min readMarkdown
$request->validate([
'email' => ['required','string','unique:users,email,'.$user_id],
'username' => ['required','string','unique:users,username,'.$user_id],

16 views

About the author

  • I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.

No comments yet. Be the first to comment.

More from this blog