Laravel Community Tools by Tighten

Lelectrolux

Joined: 11 years ago
Total tricks: 1
Last trick: 11 years ago

Submitted tricks

Let's talk about date validation and how theses 4 rules works, as their behaviour is even more awesome than documented. What is know : - date, before and after uses strtotime PHP native function. - date_format uses date_parse_from_format PHP native function But how do we validate a date after today in a custom format ? And what to do to compare two form fields ? What is not documented is that before and after rules check if a date_format rule exists, and will use this format if needed. Example: I have french formated dates (31/01/2015), and two fields, start_date and end_date. start_date must be after tomorrow, and end_date after start_date
Lelectrolu... 11 years ago 58119
5.0