validating date not working i have a validation rule for date as follows
'date' => 'required|date|date_format:"d/m/Y"',
and i have a jquery date picker on the page and it shows the date
with a format
$('.datepicker').datepicker({
dateFormat: 'dd/mm/yy'
});
and show the date like this
12/09/2016
when i enter date like the above it saves well and when i just choose another date 13/09/2016 it return error says The date is not a valid date !!!
although the same code without any change !!! but just a different date
From documentation
date_format:format
The field under validation must match the given format. The format will be evaluated using the PHP date_parse_from_format function. You should use either date or date_format when validating a field, not both.
https://laravel.com/docs/5.3/validation
You can not use date and date_format in same rule
Please sign in or create an account to participate in this conversation.