RocksonZeta / koa-validate

validate koa request params and format request params
https://github.com/RocksonZeta/koa-validate
MIT License
284 stars 32 forks source link

optional doesn't work #30

Open behind2 opened 6 years ago

behind2 commented 6 years ago

image

koa-router writes like above picture

debuginfo image

image

image

I request via browser I didn't pass 'id' param, but debuginfo indicates "exists: true", In fact, it doesn't exists. So I think optional method doesn't work!?

I find koa-router docs, find this: image

so I was confused, please give me some advice? tks