jeudi 15 novembre 2018

Laravel Validation - Check Active Duplicate Emails [duplicate]

This question already has an answer here:

The table structure:

users: id  - email - active

I want check duplicated email only when active is 0.

For all emails,I do this:

'email' => 'required|unique:users|email',

Is it possible to define a condition in the validation?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2qP65Dc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire