📜  enie 字母验证 laravel 正则表达式 - PHP 代码示例

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

代码示例1
return [
                    'fname' => 'required|max:255|regex:/^[a-zA-ZÑñ\s]+$/',
                    'lname' => 'required|max:255|regex:/^[a-zA-ZÑñ\s]+$/',
                    'mname' => 'max:255|alpha',
                     'file' => 'image|mimes:jpg,jpeg,png',
               'contact_no' => 'regex:/^[-0-9\+]+$/',
            'date_of_birth' => 'required|date_format:Y-m-d',
                'school_id' => 'required|exists:schools,id',
                'degree_id' => 'required|exists:degrees,id',
        ];