我正在研究Laravel 4.2.我正在try 使用Validator验证带有正则表达式的名称字段,下面是我的规则:
public static $rules_save = [
'class_subjects' => 'required|regex:/[0-9]([0-9]|-(?!-))+/'
];
But as soon as I call the rule to be validated an error is thrown, see below:
preg_match(): No ending delimiter '/' found