,'on'=>['add','edit']
],
['addr_id','required','message'=>'{attribute} 不能为空','on'=>'edit'],
[['province...),
//正则验证器:
array('name','match','pattern'=>'/^[a-z0-9\-_]+$/'),
//数字验证器:
array('id', 'numerical', 'min...'=>1, 'max'=>10, 'integerOnly'=>true),
//类型验证 integer,float,string,array,date,time,datetime
array('created...', 'type', 'datetime'),
//文件验证:
array('filename', 'file', 'allowEmpty'=>true, 'types'=>'zip, rar, xls...'maxSize'=>1024*1024*10, //上传大小限制,注意不是php.ini中的上传文件大小
'tooLarge'=>'文件大于10M,上传失败!