Forcing a Unique Rule to Ignore a Given ID in a FormRequest #1025
-
I'm trying to make it so that CRUD validation forces a unique rule to ignore the ID of the user being edited. In the "Forcing a Unique Rule to Ignore a Given ID" section of https://laravel.com/docs/11.x/validation#rule-unique there's this:
In #1015 (reply in thread) it was suggested I do I'm using this to identify the class that's doing the validation:
If I wasn't using Is the only way to get this to work to use array validation? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello @prescriptionlifeline Did you try to use:
Let me know if thats work for you. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Im glad thats work for you. I will close the issue, but please feel free to re-open or create a new one if needed. Cheers. |
Beta Was this translation helpful? Give feedback.
Hello @prescriptionlifeline
Did you try to use:
Let me know if thats work for you.
Cheers.