Unique validation dynamic ignore #8
-
When having a unique constraint on a user data objects email field, how would you ignore the currently edited user models email? |
Beta Was this translation helpful? Give feedback.
Answered by
rubenvanassche
Nov 2, 2021
Replies: 2 comments 4 replies
-
Hi @horo42, Good point! I've added support to the |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
horo42
-
I tried this like
But the constructor gives an error What should i do? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @horo42,
Good point! I've added support to the
Unique
rule to support closures so you can read the request:laravel-data/docs/advanced-usage/validation-attributes.md
Line 855 in 912c51b