preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash – CakePHP

Hey everyone,

Ran into the following error while I was mucking around with CakePHP today:


preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash

The error seemed a little weird as I wasn’t using any regex. It turned out that it was because of my custom validation methods. I had marked them as private instead of public. A bit of an ambiguous error message so hopefully this will be able to help some of you out!

Leave a comment