📜  laravel 数组验证 - PHP 代码示例

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

代码示例6
use Illuminate\Support\Facades\Validator;

$input = [
    'user' => [
        'name' => 'Taylor Otwell',
        'username' => 'taylorotwell',
        'admin' => true,
    ],
];

Validator::make($input, [
    'user' => 'array:username,locale',
]);