I guess this is exactly what you are looking for
Update the code snippet to match your condition, so in your case the enabled field instead of the deleted.
Maybe I have a bit of a weird problem: I should check that the value in a certain field is unique but only among the records that have a certain value in another field.
Example: I would like to check that the user's e-mail field is unique but considering only the records where the 'enabled' field is = 1. Basically I need to change the rule: 'email' => 'required | email | unique: users | max: 100' of my Validator.
I would also like to know if it is possible to edit \app\Actions\Fortify\ CreateNewUser.php where there is a similar rule: 'email' => ['required', 'string', 'email', 'max: 255', 'unique: users'].
Thanks in advance.
I guess this is exactly what you are looking for
Update the code snippet to match your condition, so in your case the enabled field instead of the deleted.
Please or to participate in this conversation.