首页 > 代码库 > π框架参数规则(正则表达式验证)

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

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‘) )

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