π框架参数规则(正则表达式验证)

1、'email' => array( 'name' => 'email', 'require' => true, 'min' => '1', 'regex' => "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i", 'desc' => '邮箱', ),

2、array( 'name' => 'upfile', 'type' => 'file', 'min' => 0, 'max' => 1024 * 1024, 'range' => array('image/jpeg', 'image/png') , 'ext' => array('txt','xml') )

posted @ 2017-02-17 08:40  pengcx  阅读(512)  评论(0编辑  收藏  举报