samedi 29 avril 2017

start_time, end_time does not match the format H:i on form data Edit

I am new to laravel and facing a problem with date_format:H:i|nullable|max:8 validation in my Controller. It is working fine first time (with new record) but showing following message

Following errors occurred:

The start time does not match the format H:i. The end time does not match the format H:i.

when Editing data in edit form. When I leave the time fields unchanged (with other fields changed or unchanged). But works fine if time fields are edited(changed).

I am using <input type="time"> in my form.

The data type is Time in MySQl table. It shows "11:59 PM" in the edit view. And when submitted it submits something like "23:59".

I have googled but found not information though a similar question on other site but without any answer.

It will be nice if you can answer my question. Thanks in advance.

Zaki



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

Aucun commentaire:

Enregistrer un commentaire