mercredi 14 septembre 2016

Laravel 5.1: Validation rule for unique datetime

I have a field that is a datetime and must be unique in the database. In the form, the user will inform a date in the format mm/dd/yyyy. So when I use the validation rule unique in the repository for the date field, it is ok because it consider the hour, minute and second. They always will be different.

Do you know if there is any validation rule that ignore the hour, minute and second for a datetime?

Thanks in advace.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire