I'm using boostrap-datepicker, with "multiple-date" option activated. My "dates" looks like this : [date1, date2,...].
I'm also using an hidden input to retrieve an "id". This "id" help me to retrieve "startdate" and "enddate" inside my model.
So I'm looking for a validation rule who can tell me if my dates are valid and if they are inside two other dates that correspond to the "id" of my model.
For now my "id" and "dates" rules are like this :
$rules = [
'id' => 'required|numeric|exists:event,id,isactive,1',
'dates' => 'array'
]
English is not my native langage, so feel free to correct me or ask me anything.
P.S : I'm using Laravel 5.1
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire