koa-validate icon indicating copy to clipboard operation
koa-validate copied to clipboard

Validate sub-elements

Open brasilikum opened this issue 10 years ago • 6 comments

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 avatar May 15 '15 12:05 brasilikum

OK, pending pull request would resolve the issue

brasilikum avatar May 15 '15 14:05 brasilikum

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!

brasilikum avatar May 18 '15 09:05 brasilikum

@Brasilikum Good job, waiting for the merge!

@eisneim

There are dozens of us - DOZENS

paambaati avatar Jul 24 '15 10:07 paambaati

+1

whatyoubendoing avatar Sep 01 '15 02:09 whatyoubendoing

+1

antoinegomez avatar Jan 28 '16 16:01 antoinegomez

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

hyzhak avatar Mar 06 '16 20:03 hyzhak