在自定义验证中如下所示:
'custom' => array(
'attribute-name' => array(
'rule-name' => 'custom-message',
),
),
如何定义正则表达式以及属性名称-{regex}?!
例子:
'custom' => array(
'institute_regex:{/d{1}}' => array(
'required' => 'the field is required',
),
),