validate koa request params and format request params