Comments (1)
Thanks to ghinks suggestion, i found the offending code. this one line of code for express validator created the issue
sanitizeBody('*').escape()
i removed it and replaced it with
sanitizeBody('author').escape(),
sanitizeBody('title').escape(),
sanitizeBody('isbn').escape(),
sanitizeBody('summary').escape(),
sanitizeBody('genre.*').escape(),
Now everything works fine. the array is now passed through the req body.
from express-locallibrary-tutorial.
Related Issues (20)
- Getting a 404 error for all routes except the index route HOT 1
- change var to const or let HOT 1
- Cannot read property 'name' of null HOT 3
- I have a problem with the book_form form HOT 4
- Where to define Schema HOT 1
- No issue
- Function naming conventions HOT 2
- Error in Pug template book_delete.pug HOT 1
- first try HOT 1
- Genre List Detail Page BSON Type Error HOT 4
- MongoDB database instance to use for auth branch? HOT 2
- Confusion regarding the Part 6: Working with forms HOT 2
- error in populating database step: mongoose now installs 7.0 which doesn't use callbacks HOT 2
- Book Instance functionality not working as expected. HOT 8
- npm run serverstart not working on Windows HOT 1
- Argument passed in must be a single String of 12 bytes or a string of 24 hex characters HOT 4
- What's the use of the callbacks in async.parallel member functions ? HOT 1
- Heroku deployment error H10
- Able to insert new author even though have not setup mongodb atlas HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-locallibrary-tutorial.