Im working on Laravel 4.2. Im trying to use Validator to validate a name field with regex, here is my rule below:
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