验证规则里的confirmed
基本意思是,如果你某个值foo
的验证规则加了一个confirmed
,那么你就必须发送另一个值foo_confirmation
,而且这俩的值必须相同。
文档原文:
confirmed
The field under validation must have a matching field of foo_confirmation. For example, if the field under validation is password, a matching password_confirmation field must be present in the input.例如:
'password' => 'required|between:8,191|confirmed',
那么,你发送到后台,必须有password
和password_confirmation
2个键值对。{ password:'123', password_confirmation:'123' }