Open srinivasiyer opened 9 years ago
The change is pretty light weight that allows nested object bodies and array notations in URLS to be validated using a '.' separator
http://localhost:3000?foo[bar]=foobar can be validated as
this.checkQuery('foo.bar').eq('foobar')
the above example would require the koa-qs library to parse the get params
Also a body of
{ "foo": [{"bar": "foobar"}] }
can be validated using
this.checkBody('foo.0.bar').eq('foobar', 'Needs to be foobar');
I have worked with nested bodies in many projects and this would really useful if you can merge the request.
Coverage decreased (-75.67%) to 21.36% when pulling a5af795fcc11e86442fb83f9233667e838118aa9 on srinivasiyer:master into 0252d70d93321f7ee74ce7d508cf99874700c83d on RocksonZeta:master.
The change is pretty light weight that allows nested object bodies and array notations in URLS to be validated using a '.' separator
http://localhost:3000?foo[bar]=foobar can be validated as
the above example would require the koa-qs library to parse the get params
Also a body of
can be validated using
I have worked with nested bodies in many projects and this would really useful if you can merge the request.