unique email with deleted_at

How can i exclude records, which are marked as deleted from the email validation unique?
I also need this function:
TextInput::make('email')
                            ->email()
                            ->required()
                            ->unique(ignoreRecord: true)
                            ->label(__('Email'))
                            ->email(),


and i want to inlcude additional something like this:

->unique(modifyRuleUsing: function (Unique $rule) {
        return $rule->whereNot('is_deleted', NULL);


how would look all together please?
Was this page helpful?