jeudi 31 mars 2016

Validate whether multiple fields are unique simultaneously in laravel 5

This my request class rules.

        'eventDate' => 'required|date|after:yesterday',
        'venue' => 'required',
        'time' => 'required',

I want to validate a rule like below.

        'eventDate' && 'venue' && 'time' => 'unique'

There I need to check if there any row without same eventDate, venue and time altogether. Anyone knows how to declare such a rule?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire