express-validator icon indicating copy to clipboard operation
express-validator copied to clipboard

Wildcard for values with "."

Open sajal50 opened this issue 7 years ago • 1 comments

For example, if I have objects -

{ "foo.bar" :  { "x" : { "value" : 1 }  } }

and

{ "foobar" :  { "x" : { "value" : 1 }  } }

and in checkSchema() if I wanted to write a wildcard for "value", *.*.value only works for the second object and not the first. Is there a way to make a single wildcard to work for both?

sajal50 avatar Oct 23 '19 18:10 sajal50

That's possible now in v7.0.0, these are called globstars: **.value

Docs here

gustavohenke avatar Apr 15 '23 09:04 gustavohenke