date_format无法在Laravel中验证 [英] date_format not validating in Laravel

查看:87
本文介绍了date_format无法在Laravel中验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此验证日期:

I am using this validation for dates:

'fiscal_end' => 'required|date_format:dd/mm/yyyy'

正在做

print_r(Input::all());
die();

我得到:

[fiscal_end] => 25/01/2017 

我不明白这里是什么错误会产生错误:日期必须采用正确的格式dd/mm/yyyy.

I don't understand what's wrong here that generates the error: Date needs to be in proper format dd/mm/yyyy.

我正在使用Laravel 5.3,表单上的日期字段实际上是Bootstrap Datepicker字段.

I am using Laravel 5.3 and datefield on form is actually Bootstrap Datepicker field.

推荐答案

您正在使用错误的格式dd/mm/yyyy

You are doing with wrong format dd/mm/yyyy

将格式更改为d/m/Y

这篇关于date_format无法在Laravel中验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆