z-song / demo.laravel-admin.org

Source code of official http://demo.laravel-admin.org website.
507 stars 250 forks source link

pipeline character in rules regex #10

Open yuenrsc opened 6 years ago

yuenrsc commented 6 years ago

using pipeline character ( | ) in rules regex validation will break the rules, following Laravel 5.5 doc using array instead of one line is not working

Eg.

this will break: $form->text('test')->rules('required|regex:/^(AB|CD){2}[0-9]{4}$/');

this does not work: $form->text('test')->rules(array('required', 'regex:/^(AB|CD){2}[0-9]{4}$/'));