📜  在 laravel 中规则 - 任何代码示例

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

代码示例1
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;

Validator::make($data, [
    'zones' => [
        'required',
        Rule::in(['first-zone', 'second-zone']),
    ],
]);