0

我有一个模特前任。充当翻译的帖子,我想验证作为翻译字段的标题。这怎么可能。以下不起作用。

'title' => array(
    'notempty' => array(
    'rule' => array('notempty'),
    ),
));
4

2 回答 2

1

将规则名称更改为 camelCase: notEmpty 并添加消息

于 2013-03-01T10:20:01.060 回答
0

您在 /Locale default.po 中翻译您的消息

'title' => array(
    'notEmpty' => array(
        'rule' => array('notEmpty'),
        'message' => 'your translated message',
    ),
));

有什么大不了的?

于 2013-03-01T13:36:19.703 回答