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

Validate sub-elements #11

Open brasilikum opened 9 years ago

brasilikum commented 9 years ago

Supposed I want to validate a sub-element like:

{address:
  {street: "Millerstreet"}
}

My check

this.checkBody('address.street').notEmpty()

does not seem to work. Is it even possible to validate sub-elements with koa-validate? Or have I simply missed something?

brasilikum commented 9 years ago

OK, pending pull request would resolve the issue

brasilikum commented 9 years ago

For now I declare the dependency

"koa-validate": "dehbmarques/koa-validate#feat"

in my package.js. I hope to switch back to this module as soon as it is merged.

Works like a charm, by the way!

paambaati commented 9 years ago

@Brasilikum Good job, waiting for the merge!

@eisneim

There are dozens of us - DOZENS

whatyoubendoing commented 9 years ago

+1

antoinegomez commented 8 years ago

+1

hyzhak commented 8 years ago

:+1: Mast have. Is @RocksonZeta there any changes?