uniquewith-validator icon indicating copy to clipboard operation
uniquewith-validator copied to clipboard

How to add deleted_at, NULL

Open pawan-singleinterface opened this issue 4 years ago • 2 comments

In Laravel Validation Rule, we use deleted_at, NULL to check only data which is not soft deleted. What to use to sync with same functionality.

pawan-singleinterface avatar Feb 06 '20 07:02 pawan-singleinterface

What exactly do you mean by „to sync“?

felixkiss avatar Feb 06 '20 18:02 felixkiss

In Laravel Validation, we use following :

'email' => 'required|max:50|unique:users,deleted_at,NULL'

to make sure that for new record, it will not check soft deleted data. To do same in unique_with validation, what we need to do, I tried with deleted_at example but not succeed. Further, to debug further, I wanted to debug query, but using invalid keys also, it does not give any error.

I want help in this

pawan-singleinterface avatar Feb 06 '20 19:02 pawan-singleinterface