📜  有时在 laravel 中进行验证 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:30.550000             🧑  作者: Mango

代码示例1
Docs don't make it clear, But removing required makes it work.

$this->validate($request, [
    'password' => 'sometimes|min:8',
]);