我刚刚开始使用cakePHP,我遇到了这个问题
Warning (2): preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash [CORE/cake/libs/model/model.php, line 2611]
当我尝试添加/编辑帖子时,我明白了。它由此验证码触发:
var $validate = array(
'title' => array(
'title_not_blank' => array(
'rule' => 'nonEmpty',
'message' => 'This post is missing a title'
),
'title_unique' => array(
'rule' => 'isUnique',
'message' => 'A post with this title already exists'
)
),
'body' => array(
'body_not_blank' => array(
'rule' => 'notEmpty',
'message' => 'Post is missing its body'
)
)
);
我不知道该怎么办?有什么帮助吗?
答案 0 :(得分:22)