📜  Laravel 在密码上添加 regx - PHP 代码示例

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

代码示例1
In Controller/Request

 'password' => ['required', 'string','max:255', 'min:8', 'confirmed', 'regex:/[0-9]/', 'regex:/[a-z]/', 'regex:/[A-Z]/'],

In Blade

//8 characters minimum, 1 capital letter minimum, 1 small letter minimum, 1 number minimum.