You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body-parser and express-validator are both commonly used packages to process HTML forms. They are a pretty good fit aswell, since the parser allows the parsing of nested objects, and the validator allows the validation of nested objects. The shortcoming is when representing the param field of a validation error.
Currently, as far as I can see, there is no way to tell the body parser to use the "dot syntax", where nested objects are represented as my.nested.object instead of my[nested][object] in the HTML input names. The validator however, returns the parameter names in precisely this format, and I cannot seem to find a way to change this.
Is it possible to provide a parameter to the urlencoded options that allows the activation of qs's allowDots option? Then the fields names could be written in the dot format, parsed in the dot format and validated in the dot format.
The text was updated successfully, but these errors were encountered:
body-parser
andexpress-validator
are both commonly used packages to process HTML forms. They are a pretty good fit aswell, since the parser allows the parsing of nested objects, and the validator allows the validation of nested objects. The shortcoming is when representing theparam
field of a validation error.Currently, as far as I can see, there is no way to tell the body parser to use the "dot syntax", where nested objects are represented as
my.nested.object
instead ofmy[nested][object]
in the HTML input names. The validator however, returns the parameter names in precisely this format, and I cannot seem to find a way to change this.Is it possible to provide a parameter to the
urlencoded
options that allows the activation ofqs
'sallowDots
option? Then the fields names could be written in the dot format, parsed in the dot format and validated in the dot format.The text was updated successfully, but these errors were encountered: